Page 1 of 1

If Somebody is Touching Trigger.

Posted: September 3rd, 2009, 6:00 pm
by Scorpion
Hello

Im looking for a code that Checks if Somebody is Stood on a Trigger.

If Somebody is Stood on the Trigger do nothing about it.

But if somebody isnt stood on the Trigger Reset things.

Thanks

Re: If Somebody is Touching Trigger.

Posted: September 3rd, 2009, 6:20 pm
by Nightmare
Here you go:

Code: Select all

main()
{
	maps\mp\_load::main();

	getent("triggerCheck","targetname") thread triggerCheck();
}

triggerCheck()
{
	while(1)
	{
		self waittill("trigger", other);
		while(other isTouching(self))
			wait 1;
		thread resetStuff();
		wait 0.1;
	}
}

resetStuff()
{
	//Reset Stuff Here
}