#PARAM 1 shootrange 1.5 #PARAM 2 engagedist 1.5 PARAM 0 visibility 20 PARAM 1 shootrange 3.5 PARAM 2 engagedist 3.0 #start state state Base { Conditions { if GotTriggerArea == 1 goto Idle if PreviousResult == 0 goto Idle } Actions { NoLosCheck DontPush IgnoreWallSplines Respawnable "origin" } } #CheckLevelFlag #waiting for attack state Idle { Conditions { if Message "ogrestart" == 1 goto Patrol # if PlayerRangeP1 < 20.0 goto Patrol # if PlayerRangeP2 < 20.0 goto Patrol } Actions { } } #now normal patrol state Patrol { Conditions { if GotOpponent == 1 goto ApproachOpponent } Actions { FollowPath } } #follow the opponent till we get in range state ApproachOpponent { Conditions { if GotOpponent == 0 goto Patrol if OpponentRange < 4.0 goto AttackOpp } Actions { # IgnoreWallSplines false 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.0 goto ApproachOpponent if Random < 0.6 goto AttackOpp if PreviousResult > 0.0 goto Wait } Actions { FaceOpponent "0.6" } } state Wait { Conditions { if OpponentRange > 4.0 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.0 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.0 goto ApproachOpponent if CircleAntiClockwise "1024" == 0 goto Think } Actions { CircleOpponent "1.8" "walk" "ANTICLOCKWISE" } } state RespawnOff { Conditions { } Actions { NoAttack Respawnable "false" KillMe } }