Hi all,
I'm trying to write my own timer bomb script. What happens is this
. FIrst the player walks up to the object that you wish tod estroy. A hud is displayed asking to press [enter] to plant a bomb. If they press enter it displays the text "Bomb Planted". It then goes onto a countdown of 5,4,3,2,1. After this it explodes. Unfortunately, the script stops working at state 3. Any help would be greatly appreciated.
;Artificial Intelligence Script
;Header
desc = Countdown (Plant Bomb then countdown to destroy)
;Triggers
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\5.dds,hudname=5,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\4.dds,hudname=4,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\3.dds,hudname=3,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\2.dds,hudname=2,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\1.dds,hudname=1,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\plantbomb.dds,hudname=plantbomb,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\bombplanted.dds,hudname=bombplanted,hudhide=1,hudmake=display,state=1
:state=1,plrdistwithin=60:hudshow=plantbomb,state=2
:state=2,plrdistwithin=60,scancodekeypressed=28:hudfadeout=plantbomb,hudshow=bombplanted,hudfadeout=bombplanted,plrsound=audiobank\switches\press.wav,state=3
:state=2,plrdistfurther=100:hudfadeout=plantbomb:state=1
:state=3:timerstart,hudshow=5:state=4
:state=4,timergreater=1000:hudfadeout=5,hudshow=4,plrsound=audiobank\switches\press.wav,state=5
:state=5,timergreater=2000:hudfadeout=4,hudshow=3,plrsound=audiobank\switches\press.wav,state=6
:state=6,timergreater=3000:hudfadeout=3,hudshow=2,plrsound=audiobank\switches\press.wav,state=7
:state=7,timergreater=4000:hudfadeout=2,hudshow=1,plrsound=audiobank\switches\press.wav,state=8
:state=8,timergreater=5000:hudfadeout=1,plrsound=audiobank\switches\press.wav,state=9
:state=9,timergreater=5500:subhealth=500
;End of Script
Thanks,
Wilbur the Greatful