////DeathStarRescue_b This script controls the left lift in the second corridor state Base { Conditions { } Actions { SetPathCnxFlag "from=lift_2_b" "to=lift_2_a" "BLOCK" CnxController "from=lift_2_a" "to=lift_2_b" "off_flag=BLOCK" "obj=lift_2_door_a" "checkvisible" "on_frames=lastframeTOlastframe" SetState "Update" } } state Update { Conditions { if TurretAlive "lift_2_cam" == 0 goto NormalDoor if EitherPlayerInTriggerArea "Lift_Area" == 1 and if PartyUnderCover == 0 and if NumBaddiesThatCanSeePlayers < 2 goto CallLift } Actions { LockDoor "lift_door_2" ResetTimer } } state CallLift { Conditions { if TurretAlive "lift_2_cam" == 0 goto NormalDoor if ObstacleFinished "lift_lights_2" == 1 goto OpenLift } Actions { PlayObstacle "name=lift_lights_2" } } state OpenLift { Conditions { if TurretAlive "lift_2_cam" == 0 goto NormalDoor if DoorClosed "lift_door_2" == 1 goto LiftDeparting } Actions { if TurretAlive "lift_2_cam" == 0 goto NormalDoor CreateCreatures "locator=lift_2" "type=stormtrooper" "script=SpawnAttack" "mingroupsize=1" "maxgroupsize=2" "nacross=2" "xspacing=0.1" "zspacing=0.1" AlertCreatures "character=player" UnLockDoor "lift_door_2" OpenDoor "lift_door_2" } } state LiftDeparting { Conditions { if TurretAlive "lift_2_cam" == 0 goto NormalDoor if ObstacleAtStart "lift_lights_2" == 1 goto Update } Actions { LockDoor "lift_door_2" PlayObstacle "name=lift_lights_2" "backwards" } } state NormalDoor { Conditions { } Actions { ResetObstacle "name=lift_lights_2" UnLockDoor "lift_door_2" } }