Lift Location
Posted: Fri Apr 02, 2004 12:51 am
In my lift i have a display which tells u which floor the lift is on, however it only shows u the floor once the lift has stopped, i want it to show me which floor it is on as the lift passes thru it
i.e. if its moving from floor 1 to floor 4 the display will show 2 as it passes thru floor 2, then 3 as it moves thru floor 3.
script:
i.e. if its moving from floor 1 to floor 4 the display will show 2 as it passes thru floor 2, then 3 as it moves thru floor 3.
script:
Code: Select all
call:
$inner_triggers nottriggerable // turns off the triggers
$outer_triggers nottriggerable
$call_buttons playsound click
$call_buttons moveNorth 1 // moves buttons
$call_buttons move
wait .2
$call_buttons moveSouth 1
$call_buttons move
if(level.doorpos == 1)
{
$left_door moveEast 78
$right_door moveWest 78
$left_door move
$right_door move
level.doorpos = 0
}
$("pos_" + $lift.floor) moveNorth 2
$("pos_" + $lift.floor) move
$("doors_" + $lift.floor) playsound lift_gate
$("doors_" + $lift.floor) doclose
$lift moveto $("floor_" + self.floor)
$lift loopsound lift_sound
$lift waitmove // moves the lift to that destination
$lift.floor = self.floor
$lift loopsound lift_sound wait
$left_door moveWest 78
$right_door moveEast 78
$left_door move
$right_door move
level.doorpos = 1
$("pos_" + self.floor) moveSouth 2
$("pos_" + self.floor) move
$("doors_" + self.floor) doopen
$("doors_" + self.floor) playsound lift_gate
level.doors = $("doors_" + self.floor)
wait 1.5
$inner_triggers triggerable // turns triggers on
$outer_triggers triggerable
end