//This script controls the left lift in the prison control room "lift_5" state Base { Conditions { if MissionMode == 0 goto Update } Actions { SetPathCnxFlag "from=lift_5_b" "to=lift_5_a" "BLOCK" CnxController "from=lift_5_a" "to=lift_5_b" "off_flag=BLOCK" "obj=lift_5_door_a" "checkvisible" "on_frames=lastframeTOlastframe" } } state Update { Conditions { if TurretAlive "lift_5_cam" == 0 goto NormalDoor if EitherPlayerInTriggerArea "Lift_Area" == 1 and if PartyUnderCover == 0 and if NumBaddiesThatCanSeePlayers < 2 goto CallLift } Actions { LockDoor "lift_door_5" ResetTimer } } state CallLift { Conditions { if TurretAlive "lift_5_cam" == 0 goto NormalDoor if ObstacleFinished "lift_lights_5" == 1 goto OpenLift } Actions { PlayObstacle "name=lift_lights_5" } } state OpenLift { Conditions { if TurretAlive "lift_5_cam" == 0 goto NormalDoor if DoorClosed "lift_door_5" == 1 goto LiftDeparting } Actions { CreateCreatures "locator=lift_5" "type=stormtrooper" "script=SpawnAttack" "mingroupsize=1" "maxgroupsize=2" "nacross=2" "xspacing=0.1" "zspacing=0.1" AlertCreatures "character=player" UnLockDoor "lift_door_5" OpenDoor "lift_door_5" } } state LiftDeparting { Conditions { if TurretAlive "lift_5_cam" == 0 goto NormalDoor if ObstacleAtStart "lift_lights_5" == 1 goto Update } Actions { LockDoor "lift_door_5" PlayObstacle "name=lift_lights_5" "backwards" } } state NormalDoor { Conditions { } Actions { ResetObstacle "name=lift_lights_5" UnLockDoor "lift_door_5" } }