Results 1 to 6 of 6

Thread: How to make a teleport by eLEos

  1. #1
    ... connecting eLEos's Avatar
    Join Date
    Jul 2012
    Posts
    8
    Thanks
    4
    Thanked 8 Times in 6 Posts

    Wink How to make a teleport by eLEos

    CoD2 Radiant part

    1. Click right mouse on 2d view and click trigger>use_touch
    2. Press N and type key:targetname
    value:enter
    also type key:target
    value: (A name of the place you will go. Example:room)
    3. Click right mouse on 2d view and click script>origin
    Put it at the place you want to be teleported. (A bit higher from the ground)
    4. Press N and type key:targetname
    value: (The name of the place you choosed to type before)
    Now a red line is between them. If there isn't red line you have made a mistake somewhere.

    Scripting part

    1. Open a notepad and paste this:

    Code:
    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");
    
        other setorigin(entTarget.origin);
        other setplayerangles(entTarget.angles);
        //iprintlnbold ("You have been teleported !!!");
        wait(0.10);
      }
    }
    Save it in your maps/mp as teleport.gsc and change the Save as box to All files

    2. Open your mp_mapname.gsc file and add this line:
    Code:
    maps\mp\teleport::main();
    Finished.
    Now compile and test.
    Last edited by eLEos; 20th July 2012 at 13:55. Reason: mistake

  2. The Following 2 Users Say Thank You to eLEos For This Useful Post:

    kung foo man (20th July 2012),thOuMta (21st November 2015)

  3. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    thats a nice teleport-script because you can make as much "enter"-teleports as you want with only one script. thanks

    you can also make it a bit easier: dont set the target for the trigger by hand, just click on trigger, then origin and press W

    thats doing an auto-connection

  4. #3
    ... connecting eLEos's Avatar
    Join Date
    Jul 2012
    Posts
    8
    Thanks
    4
    Thanked 8 Times in 6 Posts
    Yes i know that.
    It is much easier

  5. #4
    Private pornesz's Avatar
    Join Date
    Jul 2012
    Location
    Hungary
    Posts
    93
    Thanks
    149
    Thanked 122 Times in 71 Posts
    Just a Question: and if I dont make the ''scripting part'' I cant use the teleport?
    XFire: pornesz

  6. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Without scripting nothing will happen ^^
    timescale 0.01

  7. The Following User Says Thank You to kung foo man For This Useful Post:

    pornesz (28th October 2012)

  8. #6
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Removed the wait 0.1 between the waittill and the setorigin. That's always fucking up jump mods. People should never use that, and removing it has (mostly) no negative effects.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  9. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (2nd October 2023)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •