script doesnt work.

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

Moderator: Core Staff

Post Reply
All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

script doesnt work.

Post by All-Killer » January 5th, 2007, 3:57 pm

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
Image

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

Post by Drofder2004 » January 5th, 2007, 5:09 pm

/developer 1

I cannot see a problem, so could you try and get the error from console?
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

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » January 5th, 2007, 7:04 pm

There is no error, thats the point. I dubble checked the targetnames but thats also not the problem
Image

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

Post by Drofder2004 » January 5th, 2007, 8:24 pm

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.
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

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

Post by Soviet » January 5th, 2007, 11:52 pm

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

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » January 6th, 2007, 6:04 pm

hmm im going to look at that then.
Image

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » January 6th, 2007, 9:40 pm

Tested it but no succes. But another thing i was thinking, can a use trigger be moved ore only a hurt and multiple trigger?
Image

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

Post by Soviet » January 6th, 2007, 11:06 pm

ive never seen it done, my guess would be no....but its probably possible somehow
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » January 6th, 2007, 11:49 pm

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.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests