//CloudCityTrap_B //Left tube lift. state Base { Conditions { if Message "TrooperLiftOn" == 1 goto Start if Debug == 4 goto Start } Actions { SetObstacleToEnd "name=lift_1" } } state Start { Conditions { } Actions { SetState "Update" } } state Update { Conditions { if NumInSetAlive "1" > 0 and if ObstacleAtStart "lift_stop1" == 0 goto KillTrooper if ObstacleAtStart "lift_stop1" == 1 and if ObstacleFinished "lift_1" == 1 and if NumInSetAlive "1" == 0 goto LiftDown } Actions { } } state LiftDown { Conditions { if ObstacleAtStart "lift_1" == 1 goto Spawn } Actions { PlayObstacle "name=lift_1" "backwards" } } state Spawn { Conditions { if NumInSetAlive "1" > 0 and if ObstacleAtStart "lift_stop1" == 0 goto KillTrooper } Actions { CreateCreatures "locator=Left_Lift" "type=Stormtrooper" "script=LiftTrooper" "AddToSet=1" PlayObstacle "name=lift_1" SetState "LiftUp" } } state LiftUp { Conditions { if NumInSetAlive "1" > 0 and if ObstacleAtStart "lift_stop1" == 0 goto KillTrooper if ObstacleFinished "lift_1" == 1 goto Update } Actions { } } state KillTrooper { Conditions { } Actions { TakeDamage "set=1" SetState "Update" } }