//Dagobah_E //Bat generation at the start and end islands state Base { Conditions { if EitherPlayerInTriggerArea "Start" == 1 goto StartSpawnBats } Actions { } } state StartSpawnBats { Conditions { if NumInSetAlive "1" == 0 goto WaitBeforeRespawning } Actions { CreateCreatures "groupsize=5" "locator=BatSpawn_1" "type=Bat" "script=l_Bat" "addtoset=1" } } state SpawnBats { Conditions { if EitherPlayerInTriggerArea "Start" == 1 goto SpawnBat } Actions { } } state SpawnBat { Conditions { if NumInSetAlive "1" == 0 goto WaitBeforeRespawning } Actions { CreateCreatures "mingroupsize=2" "maxgroupsize=4" "locator_group=BatSpawn" "off_screen" "type=Bat" "script=l_Bat" "addtoset=1" } } state WaitBeforeRespawning { Conditions { } Actions { Idle "mintime=10" "maxtime=20" SetState "SpawnBats" } }