//MosEisley_D //Handles spawning of creatures. //Messages HangarSpawn and HangarSpawnCount state Base { Conditions { if MissionMode == 0 goto Update } Actions { AddLocatorGroup "name=HSpawnLeft" AddLocatorGroup "name=HSpawnRight" AddLocatorGroup "name=HSpawnBalcony" AddLocatorGroup "name=HSpawn" } } state Update { Conditions { if Message "HangarSpawn" == 1 goto HSpawn_Phase1 if Message "HangarSpawn" == 2 goto HSpawn_Phase2 if Message "HangarSpawn" == 3 goto HSpawn_Phase3 } Actions { } } state HSpawn_Phase1 { Conditions { } Actions { CreateCreatures "locator=HSpawnLeft_3" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnLeft_2" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnLeft_1" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnBalcony_7" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnBalcony_2" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" SetMessage "name=HangarSpawn" "value=0" AlertCreatures "character=player" SetState "UpdateSpawning" } } state HSpawn_Phase2 { Conditions { } Actions { CreateCreatures "locator=HSpawnBalcony_4" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnBalcony_5" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnBalcony_6" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnRight_5" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnRight_6" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" SetMessage "name=HangarSpawn" "value=0" AlertCreatures "character=player" SetState "UpdateSpawning" } } state HSpawn_Phase3 { Conditions { } Actions { CreateCreatures "locator=HSpawnBalcony_1" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnBalcony_2" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnBalcony_7" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnLeft_6" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" Idle "mintime=0.2" "maxtime=1" CreateCreatures "locator=HSpawnLeft_4" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" SetMessage "name=HangarSpawn" "value=0" AlertCreatures "character=player" SetState "UpdateSpawning" } } state UpdateSpawning { Conditions { if Message "HangarFight" < 3 and if Message "HangarSpawnCount" == 0 goto Update if Message "HangarFight" == 4 goto Finished if Message "HangarSpawnCount" > 0 and if InMiniCut == 0 and if Timer > 1 and if IsAlive "AI_Spy" == 1 and if NumInSetAlive "10" < 10 goto NormalSpawn } Actions { ResetTimer "mintime=0" "maxtime=0.8" } } state NormalSpawn { Conditions { } Actions { CreateCreatures "locator_group=HSpawn" "type=SandTrooper" "script=HangarAttack" "addtoset=10" "yoffset=3" "dont_set_on_surface" "zipdown" SetMessage "name=HangarSpawnCount" "decrement=1" AlertCreatures "character=player" SetState "UpdateSpawning" } } state Finished { Conditions { } Actions { } }