//usedJawa - mos eisley B //controlls the minicut when the player runs drives into used car sales place state Base { Conditions { if EitherPlayerInTriggerArea "Used" == 1 and if EitherPlayerIs "Speeder_Land" == 1 and if Message "BoughtCar" == 0 goto StartCut if EitherPlayerIs "Speeder_Land" == 1 and if EitherPlayerInTriggerArea "Used" == 0 and if Message "BoughtCar" == 1 goto AlertMates if Random < 0.2 goto ChooseNewLocator if AlwaysTrue == 1 goto Talking } Actions { } } state ResetToTalk { Conditions { if EitherPlayerInTriggerArea "Used" == 1 and if EitherPlayerIs "Speeder_Land" == 1 and if Message "BoughtCar" == 0 goto StartCut if EitherPlayerIs "Speeder_Land" == 1 and if EitherPlayerInTriggerArea "Used" == 0 and if Message "BoughtCar" == 1 goto AlertMates } Actions { KeepWeaponOut "FALSE" SetSide "neutral" SetState Talking } } state Talking { Conditions { if EitherPlayerInTriggerArea "Used" == 1 and if EitherPlayerIs "Speeder_Land" == 1 and if Message "BoughtCar" == 0 goto StartCut if EitherPlayerIs "Speeder_Land" == 1 and if EitherPlayerInTriggerArea "Used" == 0 and if Message "BoughtCar" == 1 goto AlertMates if Timer > 10 and if Random < 0.5 goto Talking if Timer > 10 goto ChooseNewLocator } Actions { ResetTimer "mintime=0" "maxtime=5" Idle } } state ChooseNewLocator { Conditions { if EitherPlayerInTriggerArea "Used" == 1 and if EitherPlayerIs "Speeder_Land" == 1 and if Message "BoughtCar" == 0 goto StartCut if EitherPlayerIs "Speeder_Land" == 1 and if EitherPlayerInTriggerArea "Used" == 0 and if Message "BoughtCar" == 1 goto AlertMates if GotLocator == 1 goto GoToLocator if AlwaysTrue == 1 goto Talking } Actions { GetLocatorFromGroup "name=used" "random" } } state GoToLocator { Conditions { if EitherPlayerInTriggerArea "Used" == 1 and if EitherPlayerIs "Speeder_Land" == 1 and if Message "BoughtCar" == 0 goto StartCut if EitherPlayerIs "Speeder_Land" == 1 and if EitherPlayerInTriggerArea "Used" == 0 and if Message "BoughtCar" == 1 goto AlertMates if PathBlocked == 1 goto ChooseNewLocator } Actions { GoToLocator "Walk" SetState "Talking" } } //******************************* MINI CUT ****************************** state StartCut { Conditions { if Player1Is "Speeder_Land" == 1 goto BuyCarSetup1 if Player2Is "Speeder_Land" == 1 goto BuyCarSetup2 } Actions { cameracut "end_time=infinite" "tgt_character=myself" "FollowTgt" "range=3" "roty=110" "rotx=25" } } //loc : used_car = the locator to snap the car to //loc : used_plr = loc to snap player to //loc : used_sale = loc to snap salesman to //Used to setup the minicut for player1 state BuyCarSetup1 { Conditions { } Actions { SnapToLocator "player=1" "name=used_car" takeover "player=1" "release" SnapToLocator "player=1" "name=used_plr" SetState "BuyCar" } } //Used to setup the minicut for player2 state BuyCarSetup2 { Conditions { if Timer > 20 goto EndCut } Actions { SnapToLocator "player=2" "name=used_car" takeover "player=2" "release" SnapToLocator "player=2" "name=used_plr" SetState "BuyCar" } } state BuyCar { Conditions { } Actions { SnapToLocator "name=used_1" GoToLoc "name=used_sale" SetLocator "name=used_sale" GoToLocator "Walk" Idle "5" AddMiscPickups "character=used_jawa" "value=5000" SetMessage "name=BoughtCar" "value=1" SetState EndCut } } state EndCut { Conditions { } Actions { cameracut "end_time=1" "tgt_character=myself" "FollowTgt" "use_current_campos" SetState "Base" } } //******************************** LANDSPEEDER BEEN STOLEN BACK ***************************** state AlertMates { Conditions { } Actions { ResetTimer "mintime=0" "maxtime=5" SetLocator "name=Mates" GoToLocator "Run" SetMessage "name=Spawn" "value=5" SetState "CheckForSpeeder" } } state CheckForSpeeder { Conditions { if EmptyTakeOver "Speeder_Land" == 1 goto SneekIn if EmptyTakeOver "Speeder_Land" == 0 goto Wait } Actions { ResetTimer "mintime=0" "maxtime=5" } } state Wait { Conditions { if Timer > 10 goto CheckForSpeeder } Actions { GoToOrigin } } state SneekIn { Conditions { if TakenOver "TakeoverTarget" == 1 goto Wait if TakeOverTargetInTriggerArea "Used" == 1 goto Wait if TakeOverTargetInTriggerArea "carwash" == 1 goto Wait if HasTakeOverTarget == 0 goto Wait if TakeOverRange < 1 goto StealSpeeder } Actions { SetTakeOverTarget "type=Speeder_Land" FollowCharacter "TakeOverTarget" "RUN" "ignore_radius" "can_go_off_path" } } state StealSpeeder { Conditions { if LocatorRange < 1 goto GetOutSpeeder } Actions { TakeOver SetState GoToShop } } state GoToShop { Conditions { if LocatorRange < 1 goto GetOutSpeeder if AlwaysTrue == 1 goto GoToShop } Actions { GetLocatorFromGroup "name=used" "random" GoToLocator "WALK" } } state GetOutSpeeder { Conditions { } Actions { ReleaseTakeOver SetState "Wait" } }