How to make an easy teleport

Tutorials for Call of Duty 2 mapping

Moderator: Core Staff

Post Reply
Levcek
CJ Fan
CJ Fan
Posts: 129
Joined: March 7th, 2010, 11:37 am
Location: sLOVEnia, stajerska FTW

How to make an easy teleport

Post by Levcek » March 13th, 2010, 9:16 pm

Levcek its going to show you how to make easy teleport

xfire: ddaavviidd55 if you need any tutorials!]

ok lets go...

1. click on the 2d view and make trigger>use_touch (i make use_touch beacus its better :D)
then press N and type
key: targetname
value: enter
(press enter)
and then type
key: targetname
value: ToTheOtherSide (this can be changed to evrything what you want)
(press enter)

2. ok now make script orgin. right click on 2d view script>orgi (that means you going to be teleported here)
now press N and type
key: targetname
value: ToTheOtherSide (here must be whatever you type in trigger>use_touch)(pre
(press enter)
Ok now you get a red line. (if thers no red line select trigger>use_touch and script>orgi and make sure that 2 brushes are selected and press W

now you get red line :)

ok now the scripting time... save that all to mp_(your map name).map

ok scripting...

1. open notepad and capy that:

Code: Select all

main()
{

  entTransporter = getentarray("enter","targetname");
  if(isdefined(entTransporter))
  {
    for(lp=0;lp<entTransporter.size;lp=lp+1)
      entTransporter[lp] thread Transporter();
  }


}


Transporter()
{
  while(true)
  {
    self waittill("trigger",other);
    entTarget = getent(self.target, "targetname");

    wait(0.10);
    other setorigin(entTarget.origin);
    other setplayerangles(entTarget.angles);
    //iprintlnbold ("You have been teleported !!!");
    wait(0.10);
  }
}
and save that to maps/mp and make name teleport.gsc

and then save that and open your mp_(mapname).gsc

and add this line:

maps\mp\teleport::main();

now compile all this and test it!

tnx to Levcek :)
__________________________________________________________

Image THE MAPPER
__________________________________________________________

Image

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: How to make an easy teleport

Post by Rezil » March 13th, 2010, 9:17 pm

Tnx to modsonline really. :P
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Levcek
CJ Fan
CJ Fan
Posts: 129
Joined: March 7th, 2010, 11:37 am
Location: sLOVEnia, stajerska FTW

Re: How to make an easy teleport

Post by Levcek » March 13th, 2010, 9:19 pm

LoL rezil you are realy fast xD

i better say tnx to Nightmare for a lot of tutorials he help me a lot a lot a lot :)
__________________________________________________________

Image THE MAPPER
__________________________________________________________

Image

Levcek
CJ Fan
CJ Fan
Posts: 129
Joined: March 7th, 2010, 11:37 am
Location: sLOVEnia, stajerska FTW

Re: How to make an easy teleport

Post by Levcek » March 13th, 2010, 9:51 pm

EDIT:

then press N and type
key: targetname
value: enter
(press enter)
and then type
key: target
value: ToTheOtherSide (this can be changed to evrything what you want)
(press enter)
__________________________________________________________

Image THE MAPPER
__________________________________________________________

Image

hyper(slo)
CJ Wannabe
CJ Wannabe
Posts: 11
Joined: March 13th, 2010, 9:22 pm

Re: How to make an easy teleport

Post by hyper(slo) » April 4th, 2010, 11:09 am

Good tutorial :D tnx Levcek xD:D



ILU<3333333

Levcek
CJ Fan
CJ Fan
Posts: 129
Joined: March 7th, 2010, 11:37 am
Location: sLOVEnia, stajerska FTW

Re: How to make an easy teleport

Post by Levcek » April 27th, 2010, 2:54 pm

xDDDDD np hyp :P
__________________________________________________________

Image THE MAPPER
__________________________________________________________

Image

Laung
CJ Wannabe
CJ Wannabe
Posts: 1
Joined: September 28th, 2010, 7:48 pm

Re: How to make an easy teleport

Post by Laung » September 28th, 2010, 7:55 pm

thanks alot!
but i don't understand the last part.

what do i need to do here?

__________________________

and add this line:

maps\mp\teleport::main();

now compile all this and test it!

__________________________

reply me so fast as you can plz! (best @ xf! (xf = laung5king))

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: How to make an easy teleport

Post by Rezil » September 29th, 2010, 12:18 pm

Add that line in your maps .gsc. You can learn how to make a .gsc on modsonline. That specific line should be just after main() and the first curly bracket ({).
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests