Page 1 of 1

trigger_use

Posted: July 9th, 2006, 1:42 am
by Moriar
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?

Posted: July 9th, 2006, 2:00 am
by creator
check again if its trigger_use
sometimes it becomes world spawn again.

Posted: July 9th, 2006, 8:21 am
by Drofder2004
Script is fine, so remake you trigger_use (as said above, it can sometime be ungrouped [become worldspawn])

Posted: July 9th, 2006, 2:38 pm
by Moriar
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)..

Posted: July 9th, 2006, 2:49 pm
by Luke
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.

Posted: July 9th, 2006, 5:58 pm
by Drofder2004
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");
}
}