//MosEisley_D //Handles spawning of WompRats in bonus section. state Base { Conditions { if MissionMode == 0 goto Update } Actions { } } state Update { Conditions { if Message "CoinRatLeft" == 0 and if ObstacleChainPhase "ratgate_1" == 2 goto SpawnRats_Left if Message "CoinRatRight" == 0 and if ObstacleChainPhase "ratgate_2" == 2 goto SpawnRats_Right } Actions { } } state SpawnRats_Left { Conditions { } Actions { SetMessage "name=CoinRatLeft" "value=1" CreateCreatures "locator=SpawnRatLeft" "type=WompRat" "script=CoinRat" Idle "1" CreateCreatures "locator=SpawnRatLeft" "type=WompRat" "script=CoinRat" SetState "Update" } } state SpawnRats_Right { Conditions { } Actions { SetMessage "name=CoinRatRight" "value=1" CreateCreatures "locator=SpawnRatRight" "type=WompRat" "script=CoinRat" Idle "1" CreateCreatures "locator=SpawnRatRight" "type=WompRat" "script=CoinRat" SetState "Update" } }