weird jaildoors...

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

Moderator: Core Staff

User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

weird jaildoors...

Post by Moriar » September 30th, 2006, 2:13 pm

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!

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » September 30th, 2006, 2:59 pm

Maybe because you have that line trig_jail_door1 waittill ("trigger"); twice in 1 thread, same for all the other threads.

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » September 30th, 2006, 3:00 pm

works with xyz...
so press trigger ones and it be activated press again it be deactivated [tested it with move'xyz']
Cod 1 Mapper&Modder&Moddeler

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » September 30th, 2006, 3:05 pm

That isn't how you deactivate a trigger. you would use trigger thread maps\mp\_utility::triggerOff();

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » September 30th, 2006, 3:08 pm

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
Cod 1 Mapper&Modder&Moddeler

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » September 30th, 2006, 3:16 pm

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?

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » September 30th, 2006, 3:19 pm

well.. the co-ordinates i found inside radiant so.. i used it?
Cod 1 Mapper&Modder&Moddeler

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » September 30th, 2006, 3:31 pm

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)
{
Cod 1 Mapper&Modder&Moddeler

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » September 30th, 2006, 3:37 pm

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.

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » September 30th, 2006, 3:59 pm

thx, but.. when i test it.. it crashes my game?
Cod 1 Mapper&Modder&Moddeler

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » September 30th, 2006, 4:31 pm

it crashes without reason anyidea why?
Cod 1 Mapper&Modder&Moddeler

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » September 30th, 2006, 5:49 pm

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.

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » September 30th, 2006, 6:45 pm

i made them good, i made a orgine brush in the middle like a bar
Cod 1 Mapper&Modder&Moddeler

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » October 1st, 2006, 2:10 pm

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
Cod 1 Mapper&Modder&Moddeler

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » October 1st, 2006, 2:29 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests