//MosEisley_C state Base { Conditions { } Actions { SetState "CheckEmpty" } } state CheckEmpty { Conditions { if HasTakeOverTarget == 1 goto Move if HasTakeOverTarget == 0 goto CheckFight } Actions { SetTakeOverTarget "type=Dewback" ResetTimer "mintime=0" "maxtime=5" } } state Move { Conditions { if TakenOver == 1 goto CheckFight //if already has taken something over if TakeOverRange < 1 goto TakeOver if TakenOver "TakeoverTarget" == 1 goto CheckFight if HasTakeOverTarget == 0 goto CheckFight } Actions { FollowCharacter "TakeOverTarget" "RUN" "ignore_radius" "can_go_off_path" } } state TakeOver { Conditions { } Actions { TakeOver SetState "TakenOverFight" } } state GoToOrigin { Conditions { if OpponentInTriggerArea "DewBack" == 1 and if TakenOver == 1 goto TakenOverFight if OpponentInTriggerArea "DewBack" == 1 and if TakenOver == 0 goto CheckFight } Actions { //Idle "2" GoToOrigin "2" } } state CheckFight { Conditions { if Timer > 15 goto CheckEmpty if OpponentInTriggerArea "DewBack" == 0 and if OriginRange > 15 goto GoToOrigin if TakenOver == 1 goto TakenOverFight } Actions { ClearTakeOverTarget EngageOpponent "goalrange 1.5" "firerange=3" } } state TakenOverFight { Conditions { if OpponentInTriggerArea "DewBack" == 0 goto GoToOrigin if OriginRange > 5 goto GoToOrigin if TakenOver == 0 goto CheckFight if OpponentRange < 0.75 goto Retreat } Actions { EngageOpponent "goalrange 0.25" "firerange=1.75" } } state Retreat { Conditions { if GotOpponent == 0 goto GoToOrigin if OpponentRange > 2 goto TakenOverFight } Actions { RetreatFromOpponent "50" } } 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 > 20 goto CheckFight } Actions { ResetTimer "mintime=1" "maxtime=3" SetOpponent "opponent=player" RetreatFromOpponent "40" } }