trigger_use

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

Moderator: Core Staff

Post Reply
User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

trigger_use

Post by Moriar » July 9th, 2006, 1:42 am

Hi,
I haven't found anything with "search" for a trigger_use...
this is my problem: I've made a map with a trigger_use (targetname:hurtytrig)
and a platform which moves(targetname:hurtymove) and an elevator(targetname:hurtylift)...
my scripting:
main()
{
thread hurty();

}

hurty()
{
hurtylift = getent ("hurtylift","targetname");
hurtymove = getent ("hurtymove","targetname");
trigger = getent ("hurtytrig","targetname");
while(1)
{
trigger waittill ("trigger");
hurtymove moveZ (-16,2,0.5,0.5);
hurtymove waittill ("movedone");
hurtymove moveX (-64,2,0.5,0.5);
hurtymove waittill ("movedone");
hurtylift moveZ (167,5,0.5,0.5);
hurtylift waittill ("movedone");
wait (3);
hurtylift moveZ (-167,5,0.5,0.5);
hurtylift waittill ("movedone");
hurtymove moveX (64,2,0.5,0.5);
hurtymove waittill ("movedone");
hurtymove moveZ (16,2,0.5,0.5);
hurtymove waittill ("movedone");
}
}
but my trigger_use doesn't work...
Can anyone help me with it?

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » July 9th, 2006, 2:00 am

check again if its trigger_use
sometimes it becomes world spawn again.
Cod 1 Mapper&Modder&Moddeler

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » July 9th, 2006, 8:21 am

Script is fine, so remake you trigger_use (as said above, it can sometime be ungrouped [become worldspawn])
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

Post by Moriar » July 9th, 2006, 2:38 pm

It's still not working :cry:

Can it be the 2nd trigger? I got 2 triggers same targetname + both a hintstring(trigger1=Press the [Use]button to enter the Moriar secretroom, trigger2= Press the [Use]button to leave the Moriar secretroom)..

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » July 9th, 2006, 2:49 pm

If the hintstring works then i think the trigger should be fine, but if you've got 2 with the same targetname, not sure it will work..but if the 2 triggers do the same thing, then i think you could make them into 1 entity by selecting both trigger brushes and making them a trigger_whatever, that would be the best way if thats the case.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » July 9th, 2006, 5:58 pm

If you have 2 objects with same targetname, you must use an array

Code: Select all

main()
{
thread hurty();

}

hurty()
{
hurtylift = getent ("hurtylift","targetname");
hurtymove = getent ("hurtymove","targetname");
trigger = getentARRAY ("hurtytrig","targetname");
while(1)
{
trigger waittill ("trigger");
hurtymove moveZ (-16,2,0.5,0.5);
hurtymove waittill ("movedone");
hurtymove moveX (-64,2,0.5,0.5);
hurtymove waittill ("movedone");
hurtylift moveZ (167,5,0.5,0.5);
hurtylift waittill ("movedone");
wait (3);
hurtylift moveZ (-167,5,0.5,0.5);
hurtylift waittill ("movedone");
hurtymove moveX (64,2,0.5,0.5);
hurtymove waittill ("movedone");
hurtymove moveZ (16,2,0.5,0.5);
hurtymove waittill ("movedone");
}
}
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests