Hi all! This is my very first script, and it's coming along well. I need help to fix some things of which I don't know any scripts for. It would help if there was a "setentityhealth=0" script, but is there actually one?
Anyway, here it is:
;Artificial Intelligence Script
;Header
desc = "Use" Action near a red Bomb indicator then setting the bomb, then the bomb will explode after some seconds.
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=plantbombprompt,hudhide=1,hudmake=display,state=1
:state=1,plrdistwithin=60:hudshow=plantbombprompt,hudfadeout=plantbombprompt
:state=1,plrdistwithin=60,plrusingaction=1:state=2
:state=2:alttexture=1,setalphafade=100,sound=gamecore\guns\modernday\uzi\dryfire.wav,hudhide=plantbombprompt,timerstart,state=3
:state=3,timergreater=6000:sound=gamecore\guns\ww2\bazooka\explode.wav,rundecal=1,triggerforce=600,state=4
:state=4,:destroy
;End of Script
EXPLANATION:
The player will walk to the entity which resembles a bright red shape of the bomb (the red colour is it's primary texture). If the player is close to the bomb placement slot, you can see a hud. The player presses enter.
A 'click' is heard, the entity switches to its Alternative Texture (which makes it appear as if the bomb appears in the previously red bomb slot).
After 6 seconds, the bomb should explode (i.e. run an explosion decal, run a sound file, cause enities and player nearby to suffer damage and knockback force, and the bomb entity itself should then be destroyed).
That's what's supposed to happen. Everything works fine, but it doesn't run any decal, and doesn't affect nearby entities and player at all.
How can I fix this? Can anyone tell me?
Thanks
A starting Games Designer. Need levels, characters and anything drawn and designed? Let me know...