So I have just started to learn scripting and I probably should've gone with something a tad bit easier but I wanted something to be proud of. With this script I was aiming to get a TF341 character to:
1. Sit down (animation)
2. Remain seated until a sound is heard.
3. Get up (animation)
4. Head towards the direction of the sound.
5. If they see the player they will engage and pursue them.
The script I came up with (bear in mind it is my first script):
;Desc- Chair Guy (Main)
:state=0:animate=136,state=1,etimerstart
:state=1,animationover=136,etimergreater=1210:animate=137,state=2
:state=2,healthless=1:animate=123,destroy,state=60
:state=2,aiheardsound=1:etimerstart,animate=135,state=3
:state=3,animationover=135:aimovetosound,airotatetosound,state=4
:state=4,plrcanbeseen,plrdistwithin=100,plrdistfurther=10:shootplr
:state=4,plrcanbeseen,plrdistfurther=100:followplr
:state=4,plrcanbeseen,plrdistwithin=10:aiusemelee
:state=4,healthless=1:destroy,state=60
;End of script.
Unfortunately it is not fully operational. The character does animate when sitting down and remains seated, however they don't do much else apart from die when their health gets below 1. They don't react to any sound produced, nor can they see the player.
Any help is appreciated.
(I'm running stock fpsc V120 beta 15)