//Sets: // (Code) wave creatures // 1: Tie fighters (and bombers in wave 3) // 2: goodies state Base { Conditions { } Actions { AddLocatorGroup "name=spawn" AddLocatorGroup "name=back" SetState "Update" } } state Update { Conditions { if Timer > 2 and if Random > 0.3 and if NumInSetAlive "1" < 7 goto SpawnTie if Timer > 2 and if Random > 0.7 and if NumInSetAlive "1" < 7 goto SpawnBomb if NumInSetAlive "2" < 5 and if Random > 0.5 goto SpawnXwing if NumInSetAlive "2" < 5 and if Random > 0.5 goto SpawnYwing } Actions { // ResetTimer "mintime=0" "maxtime=2" } } state SpawnTie { Conditions { } Actions { CreateCreatures "type=tiefighter" "type=TieInterceptor" "script=attack_tie" "addtoset=1" "locator_group=back" "dont_set_on_surface" "off_screen" "nearest_player" SetState "Update" } } state SpawnBomb { Conditions { } Actions { CreateCreatures "type=tiebomber" "script=attack_bomber" "addtoset=1" "locator_group=back" "dont_set_on_surface" "off_screen" "nearest_player" SetState "Update" } } state SpawnXwing { Conditions { } Actions { CreateCreatures "type=xwing" "script=attack_tie" "addtoset=2" "locator_group=back" "dont_set_on_surface" "off_screen" "nearest_player" SetState "Update" } } state SpawnYwing { Conditions { } Actions { CreateCreatures "type=ywing" "script=attack_tie" "addtoset=2" "locator_group=back" "dont_set_on_surface" "off_screen" "nearest_player" SetState "Update" } }