//JabbasPalace_E state Base { Conditions { if FreePlay == 1 goto FreePlay_Update if IAm "R2D2" == 1 goto R2D2_Update if IAm "C3PO" == 1 goto C3PO_Update if AlwaysTrue == 1 goto Normal_Update } Actions { } } //// state FreePlay_Update { ReferenceScript { Script=GeneralParty Source=Global ReturnState=FreePlay_Update Conditions { } } Conditions { } Actions { FollowPlayer "1" } } //// state Normal_Update { Conditions { if HelpWithTriggers == 1 goto Normal_HelpWithTriggers if GotOpponent == 1 goto Normal_MoveAway } Actions { FollowPlayer "1" } } state Normal_GetLocator { Conditions { if HelpWithTriggers == 1 goto Normal_HelpWithTriggers if GotOpponent == 0 goto Normal_Update } Actions { GetLocatorFromGroup "name=Flee" "furthest_from_opponent" SetState "Normal_MoveAway" } } state Normal_MoveAway { Conditions { if HelpWithTriggers == 1 goto Normal_HelpWithTriggers if GotOpponent == 0 goto Normal_Update if GotLocator == 0 goto Normal_GetLocator } Actions { GoToLocator "0.25" SetState "Normal_WaitAtLocator" } } state Normal_WaitAtLocator { Conditions { if HelpWithTriggers == 1 goto Normal_HelpWithTriggers if GotOpponent == 0 goto Normal_Update if GotLocator == 0 goto Normal_GetLocator if OpponentRange < 1.5 goto Normal_GetLocator if BeenHit == 1 goto Normal_GetLocator } Actions { FaceOpponent } } state Normal_HelpWithTriggers { Conditions { if HelpWithTriggers == 0 goto Normal_Update } Actions { HelpWithTriggers } } //// state C3PO_Update { Conditions { if GotLocator == 0 goto C3PO_GetLocator } Actions { GoToLocator SetState "C3PO_GetLocator" } } state C3PO_GetLocator { Conditions { } Actions { GetLocatorFromGroup "name=C3PO" FaceOpponent "2" SetState "C3PO_Update" } } //// state R2D2_Update { Conditions { if GotLocator == 0 goto R2D2_GetLocator } Actions { GoToLocator FaceOpponent "2" SetState "R2D2_GetLocator" } } state R2D2_GetLocator { Conditions { } Actions { GetLocatorFromGroup "name=R2D2" SetState "R2D2_Update" } }