The French Tourist ! wrote:Well. But be careful with while(1) because it makes an infinite loop, so u must quit the loop when the player does not touch the trigger anymore.
nuggets wrote:else
{
end
}
end
although if your running this, the trigger maybe triggered again while the play remains in the trigger,
though adding a variable will solve it
local.player = parm.other
while (1)
if (local.player isTouching $trigger)
{
if (local.player.triggered == 1)
{
end
}
else
{
//do you stuff
local.player.triggered = 1
}
}
else
{
local.player.triggered = 0
end
}
end
hope this helps, prob not cos it's all foreign 2 me :-/
Bjarne BZR wrote: So Krane: can you tell us what you want to do with it? Just in a very non-technical way... what are you aiming for?
I'm looking for a trigger that, when a allied player is inside, starts to kill him slowly, among w/ a series of mustard gas fx (creative, no?). But if he backs off (gets out of the trigger), he stops being hurt...Inside, gas and hurt...outside, no-hurt.
Well, the trigger multiple will handle the hurt part easily. I have these in my map so if you stand too close to a fire, or fall into a vat of acid, you start to take damage.
mustard:
local.player = parm.other
if(local.player istouching $gases_trigger)
{
$gases anim start // only runs once coz of if
$gases_trigger volumedamage 3
wait 1 //or whatever
}
$gases anim stop // stops the anim when player leaves the trigger
end