Page 1 of 2

weird jaildoors...

Posted: September 30th, 2006, 2:13 pm
by Moriar
hello,

me and creator are making map, but when we try to test it, this happens...

script by creator:

and it says:

Code: Select all

******* script compile error *******<br />
bad syntax: (file 'maps\mp\m_jail.gsc', line 22)<br />
trig_jail_door1 waittill ("trigger");

But it worked when we used moveXYZ

Scripting work:

Code: Select all

main()
{
thread jail_door1();
thread jail_door2();
thread jail_door3();
thread jail_door4();
thread jail_door5();
thread jail_door6();
}

jail_door1()
{
jail_door1 = getent ("jail_door1","targetname");
trig_jail_door1 = getent ("trig_jail_door1","targetname");

while (1)
{
trig_jail_door1 waittill ("trigger");
jail_Door1 moveto ((-526.2,548.2,67.8), 5);
jail_door1 waittill ("movedone");
wait 0.5
trig_jail_door1 waittill ("trigger");
jail_door1 moveto ((-441.3,633.7,67.8), 5);
}
}

jail_door2()
{
jail_door2 = getent ("jail_door2","targetname");
trig_jail_door2 = getent ("trig_jail_door2","targetname");

while (1)
{
trig_jail_door2 waittill ("trigger");
jail_Door2 moveto ((-526.2,548.2,67.8), 5);
jail_door2 waittill ("movedone");
wait 0.5
trig_jail_door2 waittill ("trigger");
jail_door2 moveto ((-441.3,633.7,67.8), 5);
}

jail_door3()
{
jail_door3 = getent ("jail_door3","targetname");
trig_jail_door3 = getent ("trig_jail_door3","targetname");

while (1)
{
trig_jail_door3 waittill ("trigger");
wait 0.5;
jail_door3 movex (-65, 5, 2.5, 2.5);
jail_door3 waittill ("movedone");
wait 1;
trig_jail_door3  waittill ("trigger");
jail_door3 movex (65, 5, 2.5, 2.5);
wait 5;
}
}

jail_door4()
{
jail_door4 = getent ("jail_door4","targetname");
trig_jail_door4 = getent ("trig_jail_door4","targetname");

while (1)
{
trig_jail_door4 waittill ("trigger");
wait 0.5;
jail_door4 movex (-65, 5, 2.5, 2.5);
jail_door4 waittill ("movedone");
wait 1;
trig_jail_door4 waittill ("trigger");
jail_door4 movex (65, 5, 2.5, 2.5);
wait 5;
}
}

jail_door5()
{
jail_door5 = getent ("jail_door5","targetname");
trig_jail_door5 = getent ("trig_jail_door5","targetname");

while (1)
{
trig_jail_door5 waittill ("trigger");
jail_Door5 moveto ((-526.2,548.2,67.8), 5);
jail_door5 waittill ("movedone");
wait 0.5
trig_jail_door5 waittill ("trigger");
jail_door5 moveto ((-441.3,633.7,67.8), 5);
}
}

jail_door6()
{
jail_door6 = getent ("jail_door6","targetname");
trig_jail_door6 = getent ("trig_jail_door6","targetname");

while (1)
{
trig_jail_door6 waittill ("trigger");
jail_Door6 moveto ((-526.2,548.2,67.8), 5);
jail_door6 waittill ("movedone");
wait 0.5
trig_jail_door6 waittill ("trigger");
jail_door6 moveto ((-441.3,633.7,67.8), 5);
}
}
I really hope someone can help us...

Thanks In Advance!

Posted: September 30th, 2006, 2:59 pm
by Luke
Maybe because you have that line trig_jail_door1 waittill ("trigger"); twice in 1 thread, same for all the other threads.

Posted: September 30th, 2006, 3:00 pm
by creator
works with xyz...
so press trigger ones and it be activated press again it be deactivated [tested it with move'xyz']

Posted: September 30th, 2006, 3:05 pm
by Luke
That isn't how you deactivate a trigger. you would use trigger thread maps\mp\_utility::triggerOff();

Posted: September 30th, 2006, 3:08 pm
by creator
example?
(o and with deactivate i mean: press on trigger it opens, press again it closes and continue that)

ok well i remove them but now i get this error

Code: Select all

bad syntax: (file 'maps\mp\m_jail.gsc', line 22)
jail_door1 moveto ((-441.3,633.7,67.8), 5);
i never worked with 'moveto' so i cannot see the problem

Posted: September 30th, 2006, 3:16 pm
by Luke
The only thing that seems odd to me is why you have a decimal point on all the axis for the origin...how did u come up with that?

Posted: September 30th, 2006, 3:19 pm
by creator
well.. the co-ordinates i found inside radiant so.. i used it?

Posted: September 30th, 2006, 3:31 pm
by creator
fixed the moveto error wait 0.5 was causing it (didnt had a ; behind it)
but now a new error:

Code: Select all

bad syntax: (file 'maps\mp\m_jail.gsc', line 43)
{

Posted: September 30th, 2006, 3:37 pm
by Luke
lol, didn't see that. As for the coordinates, you must have snap to grid off to get decimals, which isn't recommended.

You got a missing } at the end of the jail_door2 thread.

Posted: September 30th, 2006, 3:59 pm
by creator
thx, but.. when i test it.. it crashes my game?

Posted: September 30th, 2006, 4:31 pm
by creator
it crashes without reason anyidea why?

Posted: September 30th, 2006, 5:49 pm
by Luke
It would crash if you didn't create the brushmodel with the origin correctly, make sure they are 1 entity, meaning both brushes make 1 brushmodel.

Posted: September 30th, 2006, 6:45 pm
by creator
i made them good, i made a orgine brush in the middle like a bar

Posted: October 1st, 2006, 2:10 pm
by creator
well its still crashing, i was wondering if some one can make a small 'moveto script' for me, cause i cannot see the problem to it and it gives no error

Posted: October 1st, 2006, 2:29 pm
by Luke
The moveto script ur using is fine, I tested the first thread and no problems. All i can suggest is remaking your brushmodels and even triggers, and just test 1 at a time.