istouching trigger

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

istouching trigger

Post by fuhrer »

ok heres my problem, i have a door and 2 multiple triggers..

the first one is door_trigger, the second door_trigger_standby.

my idea is, door_trigger opens the door but only while a player is still triggering it. however that trigger will not fire unless someone else is triggering door_trigger standby... summary boths triggers need to be fire to open the door..

so far i have it working so that at the start, door trigger is not triggerable.

script....

Code: Select all

door_standby:

$door_standby_trigger nottriggerable
local.player = parm.other
while (local.player istouching $door_standby_trigger)
{
$door_trigger triggerable
$door_standby_trigger triggerable
end
}

it works but, door_trigger remains triggerable after door_standby thread has been triggered, which is not the idea..

how do i script it so that door_trigger will not fire unless another player is standing in the door_standy trigger.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

$door_standby_trigger nottriggerable
end

door_standby:
local.player = parm.other
while (1)
if (local.player istouching $door_standby_trigger)
{
$door_trigger triggerable
$door_standby_trigger triggerable
wait .5
end
}
else
{
$door_trigger nottriggerable
$door_standby_trigger nottriggerable
wait .5
end
}
hope this helps, prob not cos it's all foreign 2 me :-/
Post Reply