Page 1 of 1

My door isn't working

Posted: June 30th, 2009, 2:45 am
by CONKER
I'm trying to make a door open with a trigger, but for some reason it won't work. The map loads and everything but when I go over to the door it shows the hand symbol for me to press F. I press F but nothing happens, the door doesn't move or anything. Here's what my .gsc file says.

Code: Select all

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

	thread door1();
}


door1()
{
	door1 = getent ("door_1","targetname");
	trig = getent ("door_1_trigger","targetname");

	while(1)
	{
		trig waittill ("trigger");

		platform rotate(roll,yaw,pitch, I'm not sure which one)(90,5);

		wait(5);

		platform rotate(roll,yaw,pitch, I'm not sure which one)(-90,5);

		wait(5);
	}
}
I'm not sure is there something wrong with my code or what?

Re: My door isn't working

Posted: June 30th, 2009, 3:01 am
by Soviet

Code: Select all

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

	thread door1();
}

door1()
{
	door1 = getent ("door_1","targetname");
	trig = getent ("door_1_trigger","targetname");
	while(1)
	{
		trig waittill ("trigger");
		door1 rotateyaw(90,5);
		wait(5);
		door1 rotateyaw(-90,5);
		wait(1);
	}
}
You weren't rotating the entity, you were rotating 'platform'. On that note please change your entity names in your map so that they have your map's name in front (ie: mp_yourmap_door_1 & mp_yourmap_door_1_trigger).

Re: My door isn't working

Posted: June 30th, 2009, 3:13 am
by CONKER
Cool it worked, thanks! :D