hi guys im feeling generous so im going to give this one away, i was going to keep it to myself but seeing as no one else has figured out anything for it i feel so special that you can just have this one on me!
(i have a more complex one that actually uses the entities health as a measure instead of time but the finished result is startlingly similar so this one works just as well!!!)
Here is my first script for COD:WaW style tear downable barriers
Have fun! Credit in finished works would b appreciated or a link back to my site (www.undoom.tk)
anyway here it is
it wrks on the anywithin principal, if an entity remains at your barrier for 4 seconds the barrier destroys itself
if the entity walks away and comes back the timer resets itself for another 4 seconds
had great fun with this one!
enjoy!
;Artificial intelligence script
;header
desc = destroy barrier if entity stands at it for 4 seconds
;triggers
:state=0:state=10
:state=10,anywithin=60:timerstart,sound=audiobankmiscping.wav,state=11
:state=10,anyfurther=60:state=0
:State=11,anywithin=40:state=12
:state=11,anyfurther=60:state=0
:state=12,timergreater=3000:sound=audiobankmaterials3woodS.wav,state=13
:state=13,anywithin=40:state=14
:state=13,anyfurther=40:state=0
:State=14,timergreater=4500:sound=audiobankmaterials3woodI.wav,state=15
:state=15,anywithin=40:state=16
:state=15,anyfurther=40:state=0
:State=16,timergreater=6000:sound=audiobankmaterials3woodS.wav,state=17
:state=17,anywithin=40:state=18
:state=17,anyfurther=40:state=0
:state=18,timergreater=8000:state=17
:state=17:sound=audiobankmaterials3woodD.wav,destroy
then simply set the respawn settings of the plank or barrier entity for it to either respawn after a set time or on player command
joeyleonheart501@hotmail.com
email me for more info
also you dont #have# to have the sounds there, i like it cos it adds to the sort of teary-downy-ness of it, the ping was there just cos i had trouble with the timer so i wanted it to play a sound when it changed state to make sure the script was functioning correctly
watch out for enemies glitching through the barriers, they have to be immobile and you need to make sure theres no gap between the edge of your barriers and the walls of the doorway
i also took the artilery piece from the ww2 stock entities, gave it a bazooka and some ai and now it roams round the map taking random pot shots at the player but it goes round backwards! anyone know howto stop this?
- Why is everyone on here so rude? -