help me asap!

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

Moderator: Core Staff

Post Reply
dot
CJ Wannabe
CJ Wannabe
Posts: 17
Joined: September 30th, 2007, 10:11 pm

help me asap!

Post by dot » September 30th, 2007, 10:27 pm

i was making a map and ending it and i was sooooo excited.. when i finished it i turned of pure and type /map mp_school it did not work from script compile error.. syntax maps\mp\teleportenter::main();i was soooo mad so i went into my gsc and removed it... my map worked but my teleports didnt, now i dont know how to put it in my gsc to make my teleports and my map work. HELLP!! here is my gsc just incase something is wrong

main() {
maps\mp\_load::main();
maps\mp\teleportenter::main();

thread door1_rotate();
thread door2_rotate();
}


door1_rotate()
{

door1 = getent("door1", "targetname");
trig = getent("door_trigger1", "targetname");
while (1)
{
trig
waittill("trigger");
door1 rotateYaw(90, 1.5, 0.7, 0.7);
door1 waittill("rotatedone");
wait (3);
door1 rotateYaw(-90, 1.5,
0.7, 0.7);
door1 waittill("rotatedone");
}
}

door2_rotate()
{
door2 = getent("door2", "targetname");
trig =
getent("door_trigger2", "targetname");
while (1)
{
trig waittill("trigger");
door2 rotateYaw(90, 1.5, 0.7, 0.7);
door2
waittill("rotatedone");
wait (3);
door2 rotateYaw(-90, 1.5, 0.7, 0.7);
door2 waittill("rotatedone");

}
}

dot
CJ Wannabe
CJ Wannabe
Posts: 17
Joined: September 30th, 2007, 10:11 pm

Post by dot » September 30th, 2007, 10:38 pm

so just delete the "codes" you just posted? and also do i remove those lines from the door 1 and 2?
Last edited by dot on September 30th, 2007, 10:38 pm, edited 1 time in total.

dot
CJ Wannabe
CJ Wannabe
Posts: 17
Joined: September 30th, 2007, 10:11 pm

Post by dot » September 30th, 2007, 10:39 pm

okay from door 1 and 2?

dot
CJ Wannabe
CJ Wannabe
Posts: 17
Joined: September 30th, 2007, 10:11 pm

Post by dot » September 30th, 2007, 10:42 pm

ok then how do i make my teleports work? they were workin this morning

dot
CJ Wannabe
CJ Wannabe
Posts: 17
Joined: September 30th, 2007, 10:11 pm

Post by dot » September 30th, 2007, 10:50 pm

!TUTORIAL for adding teleports to COD2!

Open your map in the editor.
Navigate to the position you want to be teleported from.
Create a large trigger (about the size of an actor).
With the trigger still selected, right click in the 2D view and select trigger_multipple.
Still with the trigger selected press n.
In the key field type targetname.
In the value field type enter, press [enter]
Now in the key field type target
In the value field type a name for the area you want to teleport to lets say for example tower press [enter] then [esc]
THATS IT FOR THE TRIGGER

Now navigate to the area you want to be teleported to.
Right click in the 2D view and select script_origin.
Position the small red cube slightly above ground or floor and not intersecting with any other brush, rotate it so the arrow points in the direction you wish to face.
With the script_origin still selected press n.
In the key field type targetname.
In the value field type tower (or whatever you chose for the target when you made the trigger) press [enter].
If you have everything correct you should now see a red "connection" line with arrows running from the trigger to the origin.
Here is a hint from Cybershot, if you dont see a red line connecting the trigger to the origin select both and press the "w" key. If you now see the red line but dont have the arrows on it pointing from trigger to origin then recheck the targetnames and target for any typo's.
THATS IT FOR THE MAPPING (save and compile)

Extract and use the teleportenter.gsc from this zip file. Place it in your maps\mp folder.
Add this line to yourmapname.gsc

maps\mp\teleportenter::main(); //this calls up the teleportenter.gsc If you are unsure where to add this line simply look in the mp_cod2teleportdemo.gsc enclosed in this zip.

Also included in this zip is the mp_cod2teleportdemo.map file. If need be you can load this up in the editor to get a better idea of how to add teleporting.

Example Download


If you require more teleports in your map simply follow the above procedure, always give the trigger the targetname of enter but make the target the same as the next script_origins targetname.

To load the cod2teleportdemo map in your game extract the cod2teleporttutorialanddemomap.IWD into your COD2\main folder, start game, select start server, mahe pure no, dedicated no, select death match, scroll down map list and select COD 2 teleport demo, start.


Many thanks to modsonline member cybershot for help with the scripting and testing.

Dadofazz


i used that from modsonline.com and my teleports where working earlieri also dont have a teleportenter.gsc... if i need that please post me what i need to put into it

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, 2007, 12:36 am

:? follow the tutorial again, but when you test it type /developer 1 before loading the map. Then it will tell you what line the error is on and it will be more specific. Tell us what it says after doing that, and remove any mods before you run developer mode.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: help me asap!

Post by Pedsdude » October 1st, 2007, 4:56 pm

main()
{
maps\mp\_load::main();
maps\mp\teleportenter::main();

thread door1_rotate();
thread door2_rotate();
}


door1_rotate()
{

door1 = getent("door1", "targetname");
trig = getent("door_trigger1", "targetname");
while (1)
{
trig waittill("trigger");
door1 rotateYaw(90, 1.5, 0.7, 0.7);
door1 waittill("rotatedone");
wait (3);
door1 rotateYaw(-90, 1.5, 0.7, 0.7);
door1 waittill("rotatedone");
}
}

door2_rotate()
{
door2 = getent("door2", "targetname");
trig = getent("door_trigger2", "targetname");
while (1)
{
trig waittill("trigger");
door2 rotateYaw(90, 1.5, 0.7, 0.7);
door2 waittill("rotatedone");
wait (3);
door2 rotateYaw(-90, 1.5, 0.7, 0.7);
door2 waittill("rotatedone");

}
}
KillerSam meant to change it to what you see above.
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests