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