PARAM 0 visibility 20 PARAM 1 shootrange 3.5 PARAM 2 engagedist 3.0 #start state state Base { Conditions { if Message "Wolves1" == 1 goto Patrol } Actions { NoLosCheck IgnoreWallSplines CheckWallSplines DontPush Respawnable "origin" # NoAttack NoRingSeg } } #now normal patrol state Patrol { Conditions { if GotOpponent == 1 goto ApproachOpponent } Actions { # NoAttack false NoRingSeg false FollowPath } } #follow the opponent till we get in range state ApproachOpponent { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange < 3.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.5 goto ApproachOpponent if Random < 0.6 goto AttackOpp if PreviousResult > 0.0 goto Wait } Actions { FaceOpponent "0.6" } } state Wait { Conditions { if OpponentRange > 3.5 goto ApproachOpponent } Actions { FaceOpponent "0.6" Setstate "Think" } } state AttackOpp { Conditions { if Timer > 1.0 goto Wait } Actions { ResetTimer EngageOpponent "goalrange engagedist" "firerange shootrange" # "instant" } } state CirclePlayerClockwise { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 3.5 goto ApproachOpponent if CircleClockwise "1024" == 0 goto Think } Actions { CircleOpponent "1.8" "walk" "CLOCKWISE" } } state CirclePlayerAntiClockwise { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 3.5 goto ApproachOpponent if CircleAntiClockwise "1024" == 0 goto Think } Actions { CircleOpponent "1.8" "walk" "ANTICLOCKWISE" } }