//MosEisley_B state Base { Conditions { } Actions { SetState "CheckEmpty" } } state CheckEmpty { Conditions { if HasTakeOverTarget == 1 goto Move if HasTakeOverTarget == 0 goto CheckFight } Actions { SetTakeOverTarget "type=ATST" "maxrange=20" ResetTimer "mintime=0" "maxtime=5" } } state Move { Conditions { if TakenOver == 1 goto CheckFight //if already has taken something over if TakeOverRange < 1.5 goto TakeOver if TakenOver "TakeoverTarget" == 1 goto CheckFight if HasTakeOverTarget == 0 goto CheckFight if CannotReachDestination == 1 goto CheckFight } Actions { FollowCharacter "TakeOverTarget" "RUN" "ignore_radius" "can_go_off_path" } } state TakeOver { Conditions { } Actions { TakeOver SetState "TakenOverFight" } } state GoToOrigin { Conditions { if TakenOver == 1 goto TakenOverFight if TakenOver == 0 and if OriginRange < 5 goto CheckFight } Actions { Idle "2" GoToOrigin } } state CheckFight { Conditions { if Timer > 15 goto CheckEmpty if OriginRange > 5 goto GoToOrigin } Actions { ClearTakeOverTarget PrefersPlayers "FALSE" EngageOpponent "goalrange 1.5" "firerange=3" } } state TakenOverFight { Conditions { if GotOpponent == 0 and if OriginRange > 5 goto GoToOrigin if TakenOver == 0 goto CheckFight } Actions { PrefersPlayers EngageOpponent "goalrange=1.5" "firerange=4.0" } } state TakenHit { Conditions { if TakenOver == 1 goto TakenOverFight if TakenOver == 0 goto CheckFight } Actions { ClearTakeOverTarget ResetTimer "mintime=0" "maxtime=5" } } ;Just been kicked out... run away state ReleasedTakeOver { Conditions { if Timer > 12 goto CheckFight } Actions { ResetTimer "mintime=1" "maxtime=3" SetOpponent "opponent=player" RetreatFromOpponent "20" } }