***SCRIPTING HELP PLEASE***

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

Moderator: Core Staff

Post Reply
Lethal323

***SCRIPTING HELP PLEASE***

Post by Lethal323 » March 27th, 2007, 10:42 pm

Hello, i need help with my script for my moving platform...My platform will move straight but when it gets the the movez it just stops Look at my code and i can explain better

Code: Select all

main()
{
thread door_slider1();
thread door_slider2();
thread spinner();
thread door_slider3();
}
door_slider1()
{
door = getent ("slider1", "targetname");
trig = getent ("slider1_trigger", "targetname");
while (1)
{
trig waittill ("trigger");
door movey (328, 2, 0.5, 0.5);
door waittill ("movedone");
wait (2);
door movey (-328, 1, 0.5, 0.5);
door waittill ("movedone");
}
}
door_slider2()
{
door = getent ("slider2", "targetname");
trig = getent ("slider2_trigger", "targetname");
while (1)
{
trig waittill ("trigger");
door movey (-2024, 4, 0.5, 0.5);
door waittill ("movedone");
wait (2);
door movey (2024, 2, 0.5, 0.5);
door waittill ("movedone");
}
}
spinner() 
{ 
spin = getent("spinner","targetname");  
trig = getent ("spinner_trigger", "targetname");
while (1) 
{ 
trig waittill ("trigger");
spin rotateroll (360, 3);
spin waittill ("rotatedone");
} 
}
door_slider3()
{
door = getent ("slider3", "targetname");
trig = getent ("slider3_trigger", "targetname");
while (1)
{
trig waittill ("trigger");
door movey (2352, 4, 0.5, 0.5);
door movez (88, 0.5, 0.5, 0.5);
wait (2) 
door movey (2352, 4, 0.5, 0.5);
door movez (-88, 0.5, 0.5, 0.5);
}
}
What did i do wrong in the door_slider3 part...it will move the 2352 but then when i need it to go down 88 it doesnt go down...If someone can help me and proofread my ENTIRE script if you have time that would be greatly appriciated... :D

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

Post by Nightmare » March 27th, 2007, 11:11 pm

No wonder!
door movey (2352, 4, 0.5, 0.5);
door movez (88, 0.5, 0.5, 0.5);
wait (2)
door movey (2352, 4, 0.5, 0.5);
door movez (-88, 0.5, 0.5, 0.5);
You cannot have them right under each other like that, you will have to put a wait(2); or a waittill("movedone"); command in between each movement.
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]

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

Post by Nightmare » March 29th, 2007, 12:58 am

running in seperate timed threads will not work. If you wanted to get diagonal movement then moveto is the way to go.
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 8 guests