//Tatooine_E state Base { ReferenceScript { Script=GeneralParty Source=Global ReturnState=Base Conditions { if InTriggerArea "bank_1" == 1 and if EitherPlayerInTriggerArea "bank_1" == 1 and if ObstacleAtStart "end_loader" == 1 if InTriggerArea "bank_2" == 1 and if EitherPlayerInTriggerArea "bank_2" == 1 and if ObstacleAtStart "end_loader" == 1 if InTriggerArea "Bridge" == 1 and if ObstacleAtStart "end_loader" == 1 if IAmA "Speeder_Land" == 1 and if ObstacleAtStart "end_loader" == 1 } } Conditions { if ObstacleAtStart "end_loader" == 0 goto FinalCut if TakenOver == 1 and if NearestPlayerRange < 5 goto GetOutSpeeder if TakenOver == 1 goto ReturnHome //if OffScreenTimer > 5 and if UnderPlayerControl == 0 and if CannotReachDestination == 1 and if InTriggerArea "bank_1" == 0 and if NearestPlayerRange > 5 goto LostParty } Actions { ClearTakeOverTarget FollowPlayer "1" } } state LostParty { Conditions { if ObstacleAtStart "end_loader" == 0 goto FinalCut if UnderPlayerControl == 1 goto Base if NearestPlayerRange < 5 goto Base if TakenOver == 1 and if NearestPlayerRange < 2 goto GetOutSpeeder if TakenOver == 1 goto ReturnHome if AlwaysTrue == 1 goto SneekIn } Actions { ClearTakeOverTarget } } state SneekIn { Conditions { if ObstacleAtStart "end_loader" == 0 goto FinalCut if UnderPlayerControl == 1 goto Base if NearestPlayerRange < 5 goto Base if TakenOver == 1 goto ReturnHome if TakeOverRange < 1 goto StealSpeeder //if Near Player Shouldnt steal - but only check if has a target... if TakeOverRange > 12 goto Base if HasTakeOverTarget == 0 goto SneekIn } Actions { SetTakeOverTarget "type=Speeder_Land" "steal" "ifCanTakeover" FollowCharacter "TakeOverTarget" "ignore_radius" "can_go_off_path" } } state StealSpeeder { Conditions { if TakenOver == 1 goto ReturnHome //Catch it if they're all around the speeder, but someone else gets their first and drives away if HasTakeOverTarget == 1 and if TakeOverRange > 5 goto Base } Actions { TakeOver } } state ReturnHome { Conditions { if PlayerRange < 1 goto GetOutSpeeder } Actions { SetLocator "name=Respawn" GoToLocator "2" "ignore_path" FollowPlayer } } state GetOutSpeeder { Conditions { } Actions { ReleaseTakeOver SetState Base } } state FinalCut { Conditions { } Actions { SetLocator "name=EndCut" GoToLocator "Walk" } }