PARAM 0 visibility 10 PARAM 1 shootrange 3.5 PARAM 2 engagedist 2.0 #start state state Base { Conditions { if LevelValue "Otmn" != 0 goto ManageState } Actions { # Disable SetMessage "name OTMINSHIELDBREAK" "value 72" DontPush # IgnoreWallSplines #CheckWallSplines # Respawnable "origin" NoAttack GroundShadow AttackPriority } } state Patrol { Conditions { if LevelValue "Otmn" != 1 goto ManageState if GotOpponent == 1 goto StartFight } Actions { # Enable NoAttack "false" FollowPlayer "Run" } } #get to the main path state StartFight { Conditions { if LevelValue "Otmn" != 1 goto ManageState if GotOpponent == 0 goto Patrol } Actions { GoToLevelPath SetState "ApproachOpponent" } } #follow the opponent till we get in range state ApproachAttack { Conditions { if LevelValue "Otmn" != 1 goto ManageState if GotOpponent == 0 goto Patrol if Timer > 0.5 goto Think } Actions { ResetTimer FollowAttack } } state ApproachOpponent { Conditions { if LevelValue "Otmn" != 1 goto ManageState if GotOpponent == 0 goto Patrol if OpponentRange < 3.0 goto AttackOpp } Actions { SetActionValue "value 0" FollowAttack } } state Think { Conditions { if LevelValue "Otmn" != 1 goto ManageState if GotOpponent == 0 goto Patrol if OpponentRange > 3.0 goto ApproachOpponent if Random < 0.1 goto JumpLeft if PreviousResult < 0.2 goto JumpRight if PreviousResult < 0.4 goto AttackOppSpecial if PreviousResult < 0.6 goto AttackOppSpecial2 if PreviousResult < 0.7 goto AttackOppSpecial3 if PreviousResult < 0.8 goto Taunt if PreviousResult > 0.0 goto AttackOpp } Actions { FaceOpponent "1.0" } } state AttackOpp { Conditions { if LevelValue "Otmn" != 1 goto ManageState } Actions { FaceOpponent "0.3" EngageOpponent "goalrange engagedist" "firerange shootrange" "instant" "exit" "noface" BlockAttacks "random 0.8" FaceOpponent "mintime 0.0" "maxtime 0.15" Setstate "Think" } } state JumpLeft { Conditions { if LevelValue "Otmn" != 1 goto ManageState if GotOpponent == 0 goto Patrol if OpponentRange > 3.0 goto ApproachOpponent } Actions { FaceOpponent "0.2" SetActionValue "value 1" "waitcontextfree" WaitActionFinished SetState "Think" } } state JumpRight { Conditions { if LevelValue "Otmn" != 1 goto ManageState if GotOpponent == 0 goto Patrol if OpponentRange > 3.0 goto ApproachOpponent } Actions { FaceOpponent "0.3" SetActionValue "value 2" "waitcontextfree" WaitActionFinished SetState "Think" } } state AttackOppSpecial { Conditions { if LevelValue "Otmn" != 1 goto ManageState } Actions { FaceOpponent "0.3" SetActionValue "value 3" "waitcontextfree" WaitActionFinished BlockAttacks "random 0.8" SetState "Think" } } state AttackOppSpecial2 { Conditions { if LevelValue "Otmn" != 1 goto ManageState } Actions { FaceOpponent "0.3" SetActionValue "value 4" "waitcontextfree" WaitActionFinished BlockAttacks "random 0.8" SetState "Think" } } state Taunt { Conditions { if LevelValue "Otmn" != 1 goto ManageState } Actions { FaceOpponent "0.3" SetActionValue "value 5" "waitcontextfree" WaitActionFinished SetState "Think" } } state AttackOppSpecial3 { Conditions { if LevelValue "Otmn" != 1 goto ManageState } Actions { FaceOpponent "0.3" SetActionValue "value 6" "waitcontextfree" WaitActionFinished BlockAttacks "random 0.8" SetState "Think" } } state TakenHit { Conditions { if LevelValue "Otmn" != 1 goto ManageState if Timer > 1.5 and if GotOpponent == 0 goto Patrol if Timer > 1.5 and if GotOpponent == 1 goto StartFight } Actions { ResetTimer BlockAttacks "random 0.95" FaceOpponent "1.0" } } state Blocking { Conditions { if LevelValue "Otmn" != 1 goto ManageState if GotOpponent == 0 goto Patrol if Timer > 1.0 goto AttackOpp } Actions { ResetTimer BlockAttacks "random 0.85" FaceOpponent "0.5" } } state RespawnOff { Conditions { } Actions { Respawnable "false" NoAttack KillMe } } state RunToRock { Conditions { if LevelValue "Otmn" != 3 goto ManageState } Actions { GotoLocator "xz_rangecheck" "1.5" SetLevelValue "type Otmn" "value 4" } } state LevelControlled { Conditions { if LevelValue "Otmn" != 4 goto ManageState } Actions { DontPush NoAttack } } state ManageState { Conditions { if LevelValue "Otmn" == 0 goto Base if PreviousResult == 1 goto Patrol if PreviousResult == 2 goto RespawnOff if PreviousResult == 3 goto RunToRock if PreviousResult > 3.0 goto LevelControlled } Actions { } } state Killed { COnditions { } Actions { SetLevelValue "type Otmn" "value 0" } }