Page 1 of 1

need elevator script help

Posted: July 10th, 2006, 10:41 pm
by creator
i made a working elevator
now i need some help with script
i can make it move with trigger_use

it works good
but the speed wont work good
and it wont go all down
why is that
here is my code
if u know how to make it good and work like a good elevator(speed)
please modifie my script.
thx.

Code: Select all

main()
{
thread jumpsmappy_elevator();
} 

jumpsmappy_elevator()
{
lift90 = getent ("lift90","targetname");
lift_trig90 = getent ("lift_trig90","targetname");

while (1)
{
lift_trig90 waittill ("trigger",user);
iprintln ("Elevator Going Down!");
wait 3;
lift90 movez (-1.344, 7.5, 3.5, 4);
lift90 waittill ("movedone");
wait 3;
lift90 movez (1.344, 7.5, 3.5, 4);
lift90 waittill ("movedone");
wait 1;
}
}

Posted: July 10th, 2006, 11:19 pm
by Drofder2004
lift90 movez (1.344, 7.5, 3.5, 4);

^ that is wrong...

You are telling the lift to move 1.344 inches (1.344 units) do not use dcimals in the first part of the moveZ statement.

Posted: July 11th, 2006, 12:31 am
by creator
hmm so i just need to remove the .
so:

Code: Select all

main()
{
thread jumpsmappy_elevator();
}

jumpsmappy_elevator()
{
lift90 = getent ("lift90","targetname");
lift_trig90 = getent ("lift_trig90","targetname");

while (1)
{
lift_trig90 waittill ("trigger",user);
iprintln ("Elevator Going Down!");
wait 3;
lift90 movez (-1344, 7.5, 3.5, 4);
lift90 waittill ("movedone");
wait 3;
lift90 movez (1344, 7.5, 3.5, 4);
lift90 waittill ("movedone");
wait 1;
}
}
right?
p.s
lol i knew something was wrong with it cause it was moving like 1 cm lol

Posted: July 11th, 2006, 10:31 am
by Nightmare
yes that is correct. remove that decimal and it will be better

Posted: July 11th, 2006, 12:00 pm
by Drofder2004
Yep thats correct, only other thing I worry about is "lift90"... please tell me there are not 90 lifts? :P

Posted: July 11th, 2006, 4:34 pm
by creator
lol no cmon im not a lift freak :P
i just took the name for test i adjust it later
;)
thanks anyway both
:)
(k)

Posted: July 11th, 2006, 4:38 pm
by creator
o yeah and nightmare how is france?
hot? cold? enjoy :P

Posted: July 11th, 2006, 5:14 pm
by Nightmare
pff, would be alot better here with my comp :P

Posted: July 11th, 2006, 5:20 pm
by creator
next time u go on vacation bring it or a laptop!!:P so u can map there also hehe

Posted: July 11th, 2006, 5:21 pm
by creator
o yeah and nightmare im buying a cod server for jumps
i will put ur jumps on my jumps and more ofcourse lol

Posted: July 11th, 2006, 5:24 pm
by creator
o yeah forgot to tell you m8
ur link to nm_pack.zip aint working
just telling :P

Posted: July 11th, 2006, 9:26 pm
by Grom
o yeah, and the edit button is awesome! :P

Posted: July 12th, 2006, 12:08 am
by creator
:? it is?
o yeah it is :D

Posted: July 12th, 2006, 1:47 pm
by Nightmare
strange that nm_pack link isnt working :? Try codfiles.com they have it.

Oh yeah, problem solved

Oh yeah, topic locked