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