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