//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=10" 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 AlertCreatures SetState "TakenOverMove" } } state TakenOverMove { Conditions { } Actions { SetLocator "name=AtstFirst" GoToLocator "3" SetState "TakenOverFight" } } state CheckFight { Conditions { if Timer > 15 goto CheckEmpty if GotOpponent == 0 goto FollowPlayer } Actions { ClearTakeOverTarget PrefersPlayers "FALSE" EngageOpponent "goalrange 1.5" "firerange=3" } } state FollowPlayer { Conditions { if GotOpponent == 1 goto CheckFight if Timer > 15 goto CheckEmpty } Actions { FollowPlayer } } state TakenOverFight { Conditions { if TakenOver == 0 goto CheckFight } Actions { PrefersPlayers EngageOpponent "goalrange=3" "firerange=5.0" "static" } } state TakenHit { Conditions { if TakenOver == 1 goto TakenOverMove if TakenOver == 0 goto CheckFight } Actions { ClearTakeOverTarget ResetTimer "mintime=0" "maxtime=5" } }