Door trigger blunder
Posted: Fri Feb 08, 2008 12:05 am
Just when I thought I had it, my script crashed MOHAA hard !!!
I have a gate that lifts up and down by a lever. It worked great when I tried it. When showing a friend he tried blocking the door (actually he tried to die from the spikes on the bottom as it closed). Blocking the door screwed up the script some how. Does anyone have an idea?
I have a gate that lifts up and down by a lever. It worked great when I tried it. When showing a friend he tried blocking the door (actually he tried to die from the spikes on the bottom as it closed). Blocking the door screwed up the script some how. Does anyone have an idea?
Code: Select all
activate_gate_switch:
local.gatestatus = 0
while (1){
$gate_trigger waittill trigger
$gate_switch playsound lighthouse_lever
if (local.gatestatus == 0)
{
$gate playsound door_metal_close_move1
$gate_switch anim move
$gate moveup 100
$gate move
$gate waitmove
local.gatestatus = 1}
else
{
$gate playsound door_metal_open_move2
$gate_switch anim idle
$gate movedown 100
$gate move
$gate waitmove
local.gatestatus = 0}
} // while(1)
end