If Somebody is Touching Trigger.

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Scorpion
CJ Wannabe
CJ Wannabe
Posts: 39
Joined: November 18th, 2007, 9:14 pm
Location: Burnley,United Kingdom

If Somebody is Touching Trigger.

Post by Scorpion » September 3rd, 2009, 6:00 pm

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

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Re: If Somebody is Touching Trigger.

Post by Nightmare » September 3rd, 2009, 6:20 pm

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
}
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests