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