escalator
Posted: August 6th, 2006, 4:14 pm
hi,
im trying to make an escalator....
this is my way to do it: I made a testmap for it and put 10 cilinders behind eachother, made them script_brushmodel, and gave them a targetname (each cilinder has its own targetname).
this is my scripting work:
but when I test this map the cilinders don't roll the way I want them to roll...
the way they should roll is:
cilinder1 rolls the player to cilinder2
cilinder2 rolls the player to cilinder3
cilinder3 rolls the player to cilinder4
cilinder4 rolls the player to cilinder5
cilinder5 rolls the player to cilinder6
cilinder6 rolls the player to cilinder7
cilinder7 rolls the player to cilinder8
cilinder8 rolls the player to cilinder9
cilinder9 rolls the player to cilinder10
can anyone help me?
im trying to make an escalator....
this is my way to do it: I made a testmap for it and put 10 cilinders behind eachother, made them script_brushmodel, and gave them a targetname (each cilinder has its own targetname).
this is my scripting work:
Code: Select all
main()
{
thread roltrap1();
thread roltrap2();
thread roltrap3();
thread roltrap4();
thread roltrap5();
thread roltrap6();
thread roltrap7();
thread roltrap8();
thread roltrap9();
thread roltrap10();
}
roltrap1()
{
roltrap1 = getent("roltrap1","targetname");
while (1)
{
roltrap1 rotateroll (360, 5);
roltrap1 waittill ("rotatedone");
}
roltrap2()
{
roltrap2 = getent("roltrap2","targetname");
while (1)
{
roltrap2 rotateroll (360, 5);
roltrap2 waittill ("rotatedone");
}
roltrap3()
{
roltrap3 = getent("roltrap3","targetname");
while (1)
{
roltrap3 rotateroll (360, 5);
roltrap3 waittill ("rotatedone");
}
roltrap4()
{
roltrap4 = getent("roltrap4","targetname");
while (1)
{
roltrap4 rotateroll (360, 5);
roltrap4 waittill ("rotatedone");
}
roltrap5()
{
roltrap5 = getent("roltrap5","targetname");
while (1)
{
roltrap5 rotateroll (360, 5);
roltrap5 waittill ("rotatedone");
}
roltrap6()
{
roltrap6 = getent("roltrap6","targetname");
while (1)
{
roltrap6 rotateroll (360, 5);
roltrap6 waittill ("rotatedone");
}
roltrap7()
{
roltrap7 = getent("roltrap7","targetname");
while (1)
{
roltrap7 rotateroll (360, 5);
roltrap7 waittill ("rotatedone");
}
roltrap8()
{
roltrap8 = getent("roltrap8","targetname");
while (1)
{
roltrap8 rotateroll (360, 5);
roltrap8 waittill ("rotatedone");
}
roltrap9()
{
roltrap9 = getent("roltrap9","targetname");
while (1)
{
roltrap9 rotateroll (360, 5);
roltrap9 waittill ("rotatedone");
}
roltrap10()
{
roltrap10 = getent("roltrap10","targetname");
while (1)
{
roltrap10 rotateroll (360, 5);
roltrap10 waittill ("rotatedone");
}
}
the way they should roll is:
cilinder1 rolls the player to cilinder2
cilinder2 rolls the player to cilinder3
cilinder3 rolls the player to cilinder4
cilinder4 rolls the player to cilinder5
cilinder5 rolls the player to cilinder6
cilinder6 rolls the player to cilinder7
cilinder7 rolls the player to cilinder8
cilinder8 rolls the player to cilinder9
cilinder9 rolls the player to cilinder10
can anyone help me?