My door isn't working

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

Moderator: Core Staff

Post Reply
User avatar
CONKER
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: June 30th, 2009, 2:25 am

My door isn't working

Post by CONKER » June 30th, 2009, 2:45 am

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?

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: My door isn't working

Post by Soviet » June 30th, 2009, 3:01 am

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).
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
CONKER
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: June 30th, 2009, 2:25 am

Re: My door isn't working

Post by CONKER » June 30th, 2009, 3:13 am

Cool it worked, thanks! :D

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests