ItsMods

Full Version: Wait until a player exits the trigger
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any function/waittill which detects when a player is leaving a trigger?

I'm talking about the opposite of this waittill:
Code:
waittill( "trigger", player );

I tried distancesquared with the radius of the trigger, but that dosen't work well since it isn't the exact same "area".
(10-13-2011, 16:46)Rendflex Wrote: [ -> ]Is there any function/waittill which detects when a player is leaving a trigger?

I'm talking about the opposite of this waittill:
Code:
waittill( "trigger", player );

I tried distancesquared with the radius of the trigger, but that dosen't work well since it isn't the exact same "area".

Code:
while( true )
{
    trigger waittill( "trigger", player );

    if( !isDefined( trigger.lastPlayer )
        trigger.lastPlayer = player;
    else if( trigger.lastPlayer != player )
    {
        trigger.lastPlayer iPrintLnBold( "you left the trigger" );
        trigger.lastPlayer == player;
    }
}

maybe this?

edit: nvm this wont work because it needs another player to trigger it