Scripts / on entity deaths

Author
Message
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 14th Aug 2016 19:55
I've looked at smallgs scripts and I can't quite get it, I've tried to set a global variable go up when I kill an enemy but that don't work on the ai exit script. How can I tell when an entity is dead ? I copied the fast zombies ai and added this to it but nothing happens when the zombie dies, I have it prompted on screen the variable to watch it.



is there an entity variable I don't know about?
Markchapman10 is my Skype let's have some dev talk.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Aug 2016 11:07
Did you rename the script? Make sure that exit(e) function is named correctly.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Nathan38
13
Years of Service
User Offline
Joined: 13th Feb 2011
Location:
Posted: 15th Aug 2016 12:05
That looks like it should work, I added some stuff to the ai_soldier script and it works fine:

MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 16th Aug 2016 02:12
all I did was duplicate a zombie script and add in the g_round_state[5] = g_round_state[5] + 1, the g_round_state table is just a few variables the 5th one is or will be the kill count in the current round.
Markchapman10 is my Skype let's have some dev talk.
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 16th Aug 2016 05:41 Edited at: 16th Aug 2016 06:45


this done it thanks everyone now my stand still shall halt and my coding progress shall continue, but is there somewhere I can get all the entity states? like idle etc?
Markchapman10 is my Skype let's have some dev talk.

Login to post a reply

Server time is: 2024-05-04 02:05:41
Your offset time is: 2024-05-04 02:05:41