Page 1 of 1

trigger help

Posted: July 3rd, 2010, 4:39 pm
by Levcek
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?

Re: trigger help

Posted: July 3rd, 2010, 5:08 pm
by Rezil

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.