Scripts / [Working] Kill counter Free to use

Author
Message
exadion
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 1st Nov 2014
Location:
Posted: 2nd Nov 2014 23:24
Okay so I made a script that counts the number of enemies killed and a gate script that opens when a certain number is reached! This script should be easily adapted for a earning money or scoring script! Basically, my script is just a modded a few extra line of code in the provided ai_soldier script.
Ok the only thing we need to do is open the ai_soldier script (or whatever one you use the rpg or zombie).
look for this:


replace that with:



Don't Declare the global here, just set it.

Now you need the gate script. The gate script is where I placed to global Killed.
Call the script "killdoor.lua"

Note the door will open automatically but only once the player is close to it!
The player doesn't need to be close to the door in order for it too count kills! But It only annouces how many kills/remaining when nearby.
Make sure the AI script you place the kill line in is the one your using for the AI (for example some will by default use ai_cover or ai_charge, you may add it to any or all of them).

Now as for money or exp simply declare the the globals (trigger or attached to a object) and add them into the AI script the same way!
PM
Smartheart16
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location:
Posted: 8th Nov 2014 03:09
I Like It! Its A Great Tool, Thanks

Smartheart16@gmail.com
exadion
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 1st Nov 2014
Location:
Posted: 8th Nov 2014 05:32
Thanks!
PM
Disturbing 13
3D Media Maker
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 30th Dec 2014 22:15
Great work! Would this work with basic objects? Example- you find by shooting so many objects and then a door unlocks.

Model pack 66-99 high quality items...cheap!!

"Who loves ya baby!"

Login to post a reply

Server time is: 2024-05-07 16:07:31
Your offset time is: 2024-05-07 16:07:31