PARAM 0 visibility 10 PARAM 1 shootrange 3.5 PARAM 2 engagedist 2.0 #start state state Base { Conditions { if Message "KILLEDCYCLOPS1" == 1 goto RespawnOff if Message "DWARFKILLED" == 1 goto GetToArea } Actions { NoAttack Disable DontPush IgnoreWallSplines CheckWallSplines } } state GetToArea { Conditions { if InNodeMult "Hold" == 1 goto InArea } Actions { Enable FollowPath } } state InArea { Conditions { } Actions { StayInNode AttackPriority NoAttack "false" SetState Patrol } } state Patrol { Conditions { if GotOpponent == 1 goto StartFight } Actions { NoAttack "false" Enable FollowPath } } #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 StayNodeRatio > 0.95 goto CircleEdge if OpponentRange < 3.0 goto AttackOpp } Actions { FollowAttack } } state Think { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 3.0 goto ApproachOpponent # if CircleClockwise "4096" == 1 goto CirclePlayerClockwise # if CircleAntiClockwise "4096" == 1 goto CirclePlayerAntiClockwise if Random < 0.5 goto AttackOpp if PreviousResult > 0.0 goto Wait } Actions { FaceOpponent "1.0" } } state Wait { Conditions { if OpponentRange > 3.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" "instant" "exit" Delay 0.7 } } state CirclePlayerClockwise { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange > 3.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 > 3.0 goto ApproachOpponent if CircleAntiClockwise "1024" == 0 goto Think } Actions { CircleOpponent "1.6" "walk" "facing" "ANTICLOCKWISE" } } state TakenHit { Conditions { if Message "DWARFKILLED" == 0 goto Base if StayInNodeFlag == 0 goto GetToArea if Timer > 1.5 and if GotOpponent == 0 goto Patrol if Timer > 1.5 and if GotOpponent == 1 goto StartFight } Actions { ResetTimer } } state Killed { Conditions { } Actions { SetMessage "name KILLEDCYCLOPS1" "value 1" SetMessage "name WAVE1KILLCOUNT" "decrement 1" } } state RespawnOff { Conditions { } Actions { Respawnable "false" NoAttack KillMe } } state CircleEdge { Conditions { if StayNodeRatio < 0.9 goto ApproachOpponent if OpponentRange < 2.0 goto Think if StayNodeCombatAngle > 4096 goto MoveLeft if StayNodeCombatAngle < -4096 goto MoveRight if Timer > 1.0 goto Taunt } Actions { ResetTimer } } state MoveLeft { Conditions { if StayNodeRatio < 0.9 goto ApproachOpponent if OpponentRange < 1.5 goto Think if StayNodeCombatAngle < 1024 goto CircleEdge } Actions { CircleOpponent "1.6" "walk" "facing" "ANTICLOCKWISE" } } state MoveRight { Conditions { if StayNodeRatio < 0.9 goto ApproachOpponent if OpponentRange < 2.0 goto Think if StayNodeCombatAngle > -1024 goto CircleEdge } Actions { CircleOpponent "1.6" "walk" "facing" "CLOCKWISE" } } state Taunt { Conditions { } Actions { FaceOpponent "mintime 0.1" "maxtime 0.5" SetActionValue "value 5" "waitcontextfree" WaitActionFinished SetState "CircleEdge" } }