Page 1 of 1

script doesnt work.

Posted: January 5th, 2007, 3:57 pm
by All-Killer
im made a script but it just dont work. I cant see the problem.

Code: Select all

elevator()
{
elevator = getent ("elevator","targetname");
elevator_trig = getent ("elevator_trig","targetname");
elevator_switch = getent ("elevator_switch","targetname");
elevator_trig enablelinkto();
elevator_trig linkto(elevator);
while(1)
{
elevator_trig waittill ("trigger",user);
user iprintlnbold ("triggered");
elevator moveZ (-224,10,1,1);
elevator_switch moveZ (-224,10,1,1);
elevator_trig waittill ("trigger",user);
elevator moveZ (224,10,1,1);
elevator_switch moveZ (224,10,1,1);
wait 2;
}
}
Thanks for reading this

Posted: January 5th, 2007, 5:09 pm
by Drofder2004
/developer 1

I cannot see a problem, so could you try and get the error from console?

Posted: January 5th, 2007, 7:04 pm
by All-Killer
There is no error, thats the point. I dubble checked the targetnames but thats also not the problem

Posted: January 5th, 2007, 8:24 pm
by Drofder2004
All-Killer wrote:There is no error, thats the point. I dubble checked the targetnames but thats also not the problem
No error = mapping problem.

Posted: January 5th, 2007, 11:52 pm
by Soviet
my guess is its a targetname problem. Oftentimes if you have a targetname very simple (like elevator), it will conflict with other maps. To solve it, name the beginning of your targetnames the same as your map, then modify your script.

Posted: January 6th, 2007, 6:04 pm
by All-Killer
hmm im going to look at that then.

Posted: January 6th, 2007, 9:40 pm
by All-Killer
Tested it but no succes. But another thing i was thinking, can a use trigger be moved ore only a hurt and multiple trigger?

Posted: January 6th, 2007, 11:06 pm
by Soviet
ive never seen it done, my guess would be no....but its probably possible somehow

Posted: January 6th, 2007, 11:49 pm
by Nightmare
It is possible to move triggers but it is alittle complicated. What you would have to do is basically use the linkto command to link the trigger to a scriptbrushmodel which would move around, so yes it is possible, and yes it is complicated.