trigger help

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

Moderator: Core Staff

Post Reply
Levcek
CJ Fan
CJ Fan
Posts: 129
Joined: March 7th, 2010, 11:37 am
Location: sLOVEnia, stajerska FTW

trigger help

Post by Levcek » July 3rd, 2010, 4:39 pm

am i got 1 question for ya that im looking for it -.-'' :P

is there any trigger or what to just look at the door and doors open?
__________________________________________________________

Image THE MAPPER
__________________________________________________________

Image

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: trigger help

Post by Rezil » July 3rd, 2010, 5:08 pm

Code: Select all

main()
{
	thread look();
}

look()
{
	trig = getent("NAME_OF_TRIG_TO_LOOK_AT","targetname");
	trig_range = getent("NAME_OF_AREA_FROM_WHICH_YOU_LOOK_AT","targetname");
	while(1)
	{
	trig_range waittill("trigger", player);	
	if((player islookingat(trig))  && (player istouching(trig_range)))
		{
			//Do stuff here
		}
	wait 0.1;
	}
}
Untested, might contain errors.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests