//MosEisley_A state Base { Conditions { } Actions { ResetTimer "mintime=0" "maxtime=10" CnxController "from=steps1_a" "to=steps1_b" "off_flag=BLOCK" "obj=force_1_1" "checkvisible" "on_frames=1TO1" "bXothways" CnxController "from=steps2_a" "to=steps2_b" "off_flag=BLOCK" "obj=force_2_1" "checkvisible" "on_frames=1TO1" "bXothways" CnxController "from=door1_a" "to=door1_b" "off_flag=BLOCK" "obj=door_5_col" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" //CnxController "from=door2_a" "to=door2_b" "off_flag=BLOCK" "obj=spy_door2" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door3_a" "to=door3_b" "off_flag=BLOCK" "obj=door_2_1" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door4_a" "to=door4_b" "off_flag=BLOCK" "obj=spy_door3" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door5_a" "to=door5_b" "off_flag=BLOCK" "obj=spy_door1" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" CnxController "from=door6_a" "to=door6_b" "off_flag=BLOCK" "obj=door_6_col" "checkvisible" "on_frames=lastframeTOlastframe" "bothways" AddLocatorGroup "name=WompRat" //For spawning womprats AddLocatorGroup "name=Spawn" //For spawning citizens AddLocatorGroup "name=Talk" //Locators for citizens to go to and, errr, talk! AddLocatorGroup "name=Storm_Patrol" //Points to patrol to AddLocatorGroup "name=Storm_Stand" //Points to stand on the Gate AddLocatorGroup "name=Storm_Spawn" //Points to stand on the Gate SetMessage "GateCount" "value 0" SetMessage "AlarmRaised" "value 0" SetState "Start" } } state Start { Conditions { } Actions { CreateCreatures "mingroupsize=1" "maxgroupsize=2" "locator_group=Talk" "type=MosEisleyCitizen" "script=citizen" "addtoset=2" CreateCreatures "mingroupsize=1" "maxgroupsize=2" "locator_group=Talk" "type=MosEisleyCitizen" "script=citizen" "addtoset=2" CreateCreatures "mingroupsize=1" "maxgroupsize=2" "locator_group=Talk" "type=MosEisleyCitizen" "script=citizen" "addtoset=2" CreateCreatures "mingroupsize=1" "maxgroupsize=2" "locator_group=Talk" "type=MosEisleyCitizen" "script=citizen" "addtoset=2" CreateCreatures "mingroupsize=1" "maxgroupsize=2" "locator_group=Talk" "type=MosEisleyCitizen" "script=citizen" "addtoset=2" CreateCreatures "locator=Storm_Patrol_0" "type=SandTrooper" "script=storm" "addtoset=3" CreateCreatures "locator=Storm_Patrol_5" "type=SandTrooper" "script=storm" "addtoset=3" SetState "Update" } } //Set 2 : Citizens //Set 3 : Storm Patrol //Set 4 : Storm Reinforce //Set 5 : Storm Gate //Set 6 : Thief state Update { Conditions { if NumInSetAlive "2" < 8 goto ReinforceCitizen if Random > 0.5 //if PreviousResult < 0.5 and //if NumInSetAlive "2" < 6 goto ReinforceCitizenAlien if NumInSetAlive "3" < 2 and if ObstacleAtStart "spy_door3" == 1 and if Timer > 30 goto ReinforcePatrol //Update Spawn Troopers if patrol found player if NumInSetAlive "4" < 3 and if Message "Spawn_a" > 0 and if ObstacleAtStart "spy_door2" == 1 goto ReinforceSpawn //If party is under cover dont reinforce if NumInSetAlive "5" < 4 and if PartyUnderCover == 0 and if ObstacleAtStart "spy_door3" == 1 and if EitherPlayerInTriggerArea "Final_Area" == 1 and if Message "GateCount" < 12 goto ReinforceGate //Unless the alarm has been raised if NumInSetAlive "5" < 4 and if Message "AlarmRaised" > 0 and if ObstacleAtStart "spy_door3" == 1 and if Message "GateCount" < 12 goto ReinforceGate if NumInSetAlive "6" < 1 and if CharacterExists "Speeder_La_1" == 1 goto ReinforceThief } Actions { } } state ReinforceCitizen { Conditions { } Actions { CreateCreatures "groupsize=1" "locator_group=Talk" "type=MosEisleyCitizen" "script=citizen" "addtoset=2" "off_screen" "nearest_player" SetState "Update" } } state ReinforceCitizenAlien { Conditions { } Actions { CreateCreatures "groupsize=1" "locator_group=Talk" "type=cantinaaliens" "script=citizen" "addtoset=2" "off_screen" "nearest_player" SetState "Update" } } state ReinforcePatrol { Conditions { } Actions { ResetTimer "mintime=0" "maxtime=10" CreateCreatures "locator=Spawn_Gate" "type=SandTrooper" "script=storm" "addtoset=3" SetState "Update" } } state ReinforceSpawn { Conditions { } Actions { CreateCreatures "locator_group=Storm_Spawn" "type=SandTrooper" "script=stormReinforce" "addtoset=4" SetMessage "name=Spawn_a" "decrement=1" SetState "Update" } } state ReinforceGate { Conditions { } Actions { CreateCreatures "locator=Spawn_Gate" "type=SandTrooper" "script=stormGate" "addtoset=5" SetMessage "name=GateCount" "increment=1" SetState "Update" } } state ReinforceThief { Conditions { } Actions { CreateCreatures "locator=Storm_Patrol_4" "type=Jawa" "script=thief" "addtoset=6" SetState "Update" } }