//DeathStarEscape_C state Base { Conditions { if FreePlay == 1 goto NormalUpdate if IAm "C3PO" == 1 and if Message "RescuedDroids" == 0 goto C3PO_WaitForRescue if IAm "C3PO" == 1 and if Message "RescuedDroids" == 1 goto C3PO_Wait if IAm "R2D2" == 1 and if Message "RescuedDroids" == 0 goto R2D2_WaitForRescue if IAm "R2D2" == 1 and if Message "RescuedDroids" == 1 goto R2D2_Wait if FreePlay == 0 goto NormalUpdate } Actions { } } state NormalUpdate { ReferenceScript { Script=GeneralParty Source=Global ReturnState=NormalUpdate Conditions { } } Conditions { } Actions { FollowPlayer "1" } } //////////////////Place Droids, already been rescued/////////////////// state C3PO_Wait { Conditions { } Actions { SnapToLocator "name=C3PO_Met" SetState "NormalUpdate" } } state R2D2_Wait { Conditions { } Actions { SnapToLocator "name=R2D2_Met" SetState "NormalUpdate" } } //////////////////Droids Wait For Rescue/////////////////// state C3PO_WaitForRescue { Conditions { ;if NearestPlayerRange < 2 goto DroidsJoinIn if Message "RescuedDroids" == 1 goto DroidsJoinIn } Actions { DontPush SetTaggable "FALSE" CannotDropIn NotWithParty SnapToLocator "name=C3PO_RESCUE" } } state R2D2_WaitForRescue { Conditions { ;if NearestPlayerRange < 2 goto DroidsJoinIn if Message "RescuedDroids" == 1 goto DroidsJoinIn } Actions { DontPush SetTaggable "FALSE" CannotDropIn NotWithParty SnapToLocator "name=R2D2_RESCUE" } } state DroidsJoinIn { Conditions { if Timer > 2 goto NormalUpdate } Actions { ResetTimer DontPush "FALSE" SetTaggable SetMessage "name=RescuedDroids" "value=1" CannotDropIn "FALSE" NotWithParty "FALSE" GoToLocator "name" "Been_Rescued" "1" SetState "NormalUpdate" } }