#PARAM 1 shootrange 1.5 #PARAM 2 engagedist 1.5 PARAM 0 visibility 20 PARAM 1 shootrange 3.5 PARAM 2 engagedist 3.0 #start state state Base { Conditions { if GotTriggerArea == 1 goto Idle if PreviousResult == 0 goto Idle } Actions { NoLosCheck # IgnoreWallSplines SetHitPoints "default 9" DontPush # Respawnable "origin" } } #CheckLevelFlag #waiting for attack state Idle { Conditions { if Message "FUR2DONE" == 1 goto Patrol } Actions { } } #now normal patrol state Patrol { Conditions { if GotOpponent == 1 goto ApproachOpponent } Actions { # FollowPath Idle "mintime 2.0" "maxtime 2.0" FollowPlayer "WALK" } } #follow the opponent till we get in range state ApproachOpponent { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange < 4.0 goto AttackOpp } Actions { FollowAttack } } state ApproachAttack { Conditions { if GotOpponent == 0 goto Patrol if Timer > 0.5 goto Think } Actions { ResetTimer FollowAttack } } state Think { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 3.0 goto ApproachOpponent if Random < 0.5 goto AttackOpp if PreviousResult > 0.0 goto Wait } Actions { FaceOpponent "1.0" } } state Wait { Conditions { if OpponentRange > 4.0 goto ApproachOpponent } Actions { FaceOpponent "1.0" Setstate "Think" } } state AttackOpp { Conditions { if Timer > 1.0 goto Wait } Actions { ResetTimer EngageOpponent "goalrange engagedist" "firerange shootrange" } }