//BlockadeRunner_B state Base { Conditions { if MissionMode == 1 goto Start } Actions { } } state Start { Conditions { } Actions { SetMessage "name=NumMissionBaddies" "value=8" AddLocatorGroup "name=MissionSpawn" //block off entrance and exit to level. SetObstacleToEnd "name=bounty_door1" LockDoor "bounty_door2" CloseDoor "bounty_door2" //Turn off blowup down to freeplay area. SetVisibility "name=Thermo_04" "FALSE" //Create target CreateCreatures "locator=MissionTarget" "type=R2D2" "script=MissionTarget" SetState "Update" } } state Update { Conditions { if NumInSetAlive "1" < 4 goto SpawnCitizen if Timer > 0 and if Message "NumMissionBaddies" > 0 and if NumInSetAlive "2" < 6 goto SpawnTrooper if Message "NumMissionBaddies" < 1 and if NumInSetAlive "2" == 0 goto ResetTrooperSpawn } Actions { } } state SpawnCitizen { Conditions { } Actions { CreateCreatures "mingroupsize 1" "maxgroupsize 3" "locator_group=MissionSpawn" "max_range_to_player=10" "type=engineer" "script=MissionCitizen" "addtoset=1" "off_screen" SetState "Update" } } state SpawnTrooper { Conditions { } Actions { CreateCreatures "locator_group=MissionSpawn" "max_range_to_player=10" "type=RebelScum" "script=MissionTrooper" "addtoset=2" "off_screen" SetMessage "name=NumMissionBaddies" "decrement=1" SetState "Update" } } state ResetTrooperSpawn { Conditions { } Actions { SetMessage "name=NumMissionBaddies" "value=8" ResetTimer "mintime=-17" "maxtime=-12" SetState "Update" } }