PARAM 0 visibility 10 PARAM 1 shootrange 5.5 PARAM 2 engagedist 4.0 #start state state Base { Conditions { } Actions { SetHitPoints "default 60" DontPush Enable SetState "Patrol" } } state LevelControlled { Conditions { if LevelValue "ogre" == 1 goto Patrol } Actions { } } state Patrol { Conditions { if GotOpponent == 1 goto StartFight } Actions { BlockAttacks "false" FollowPlayer "Walk" } } #get to the main path state StartFight { Conditions { if GotOpponent == 0 goto Patrol } Actions { SetState "ApproachOpponent" } } #follow the opponent till we get in range state ApproachAttack { Conditions { if GotOpponent == 0 goto Patrol if Timer > 0.5 goto Think } Actions { ResetTimer FollowAttack } } state ApproachOpponent { Conditions { if GotOpponent == 0 goto Patrol #if OpponentRange < 5.0 goto AttackOpp if PlayerRangeP1 < 5.0 goto AttackOpp if PlayerRangeP2 < 5.0 goto AttackOpp } Actions { #FollowAttack FollowPlayer "walk" } } state Think { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 5.0 goto ApproachOpponent if CircleClockwise "4096" == 1 goto CirclePlayerClockwise if CircleAntiClockwise "4096" == 1 goto CirclePlayerAntiClockwise if Random < 0.6 goto AttackOpp if PreviousResult > 0.0 goto Wait } Actions { FaceOpponent "1.0" } } state Wait { Conditions { if OpponentRange > 5.0 goto ApproachOpponent } Actions { FaceOpponent "mintime 3.6" "maxtime 4.4" Setstate "Think" } } state forceattack { Conditions { } Actions { SetActionButton Setstate "patrol" } } state AttackOpp { Conditions { if Timer > 1.0 goto Wait } Actions { ResetTimer EngageOpponent "goalrange engagedist" "firerange shootrange" "instant" "exit" Delay 0.7 BlockAttacks "false" } } state CirclePlayerClockwise { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 5.0 goto ApproachOpponent if CircleClockwise "1024" == 0 goto Think } Actions { CircleOpponent "1.6" "walk" "facing" "CLOCKWISE" } } state CirclePlayerAntiClockwise { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 5.0 goto ApproachOpponent if CircleAntiClockwise "1024" == 0 goto Think } Actions { CircleOpponent "1.6" "walk" "facing" "ANTICLOCKWISE" } } state TaakenHit { Conditions { if Timer > 1.5 and if GotOpponent == 0 goto Patrol if Timer > 1.5 and if GotOpponent == 1 goto StartFight } Actions { ResetTimer BlockAttacks } } state Blocking { Conditions { if GotOpponent == 0 goto Patrol if Timer > 0.3 goto AttackOpp } Actions { ResetTimer } } state RespawnOff { Conditions { } Actions { Respawnable "false" NoAttack KillMe } }