Teleporters: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Teleporters)
Line 20: Line 20:
{{clr}}
{{clr}}


<!-- Suggestion to write a section on two-way teleporters, perhaps? (in a way that the player doesn't get infinitely teleported back and forth...like adding a "delay" before allowing to teleport back again) -->
Now in game, when you touch the [[trigger_teleport]], you come out at the [[info_teleport_destination]].


Now in game, when you touch the [[trigger_teleport]], you come out at the [[info_teleport_destination]].
== Two-way teleporter ==
Making a two-way teleporter is very similar to a one-way teleporter, and if you can make one of those work successfully, all thats required is common sense.
<br><br>
Firstly, create the 2 [[brush|brushes]] that will become your teleport entrances, and texture them with [[Tool_textures#trigger|tools/toolstrigger]]. Now, as with one-way teleports, click toEntity (Ctrl+T) and select [[trigger_teleport]] for both of them.
:* Set the [[keyvalues]] and [[flag|flags]] the same as a one-way teleporter, except for Remote Destination.
:* Set the Remote destination keyvalue of one teleport entrance to an appropriate name ('''teleport_destination_1''', for example) and the other entrance, to another name such as '''teleport_destination_2'''.
:* Name these [[brush entities]] something appropriate, like teleport_entrance_1 and teleport_entrance_2.
<br>
Now create 2 [[info_teleport_destination]] entities. These will be where you are teleported to.
:* Set the Name of each of them to the appropriate names thought up earlier ('''teleport_destination_1''' and '''teleport_destination_2''', for example).
:* Place the one ''teleport destination'' near to the ''entrance'' that does not teleport to it.
:* Place the other ''teleport destination'' near to the other ''teleport entrance''.
{{note|This means '''teleport_destination_1''' would be next to '''teleport_entrance_2''', and '''teleport_destination_2''' would be next to '''teleport_entrance_1'''}}
{{warning|Make sure that no part of any ''info_teleport_destination'' entity is touching the ''trigger_teleport'' brush it is next to. If this happens, whenever you teleport, it will either fling you back through the other teleport or cause an infinite loop where you are repeatedly teleporting between the 2 destinations.}}
{{note|The names of these entities are not significant, but it makes it easier to understand.}}
<br>
Now when you step into '''teleport_entrance_1''' you will be teleported to '''teleport_destination_1''' and the same with '''teleport_entrance_2''' and '''teleport_destination_2'''.
 
<!-- Suggestion to add appropriate image for this section -->


==Making Teleporters Team-Specific==
==Making Teleporters Team-Specific==

Revision as of 11:11, 11 July 2011

Template:Otherlang2

Stub

This article or section is a stub. You can help by expanding it.

Teleporters can be created using standard Source entities.

One-way teleporter

File:Rustiznotch teleportation.jpg
An example teleportation room.

Start by creating a brush and texturing it with tools/toolstrigger. Now select the brush and click toEntity (or Ctrl+T), select trigger_teleport and click Apply. This will be the area in which a player must enter to be teleported (see picture on the right).

  • Set the 'Remote Destination' to an appropriate name (teleport_destination_1, for example).
  • Change to the 'Flags' tab and check the 'Clients' flag to allow players to teleport.
Note.pngNote:(For a full list of Keyvalues and Flags see the Trigger teleport entity).

Next, create an info_teleport_destination from the entity list where you want the teleport exit to be. This will be the point where the player is teleported to.

  • Set the 'Name' attribute to the appropriate name that was used in the previous step (teleport_destination_1).

Now in game, when you touch the trigger_teleport, you come out at the info_teleport_destination.

Two-way teleporter

Making a two-way teleporter is very similar to a one-way teleporter, and if you can make one of those work successfully, all thats required is common sense.

Firstly, create the 2 brushes that will become your teleport entrances, and texture them with tools/toolstrigger. Now, as with one-way teleports, click toEntity (Ctrl+T) and select trigger_teleport for both of them.

  • Set the keyvalues and flags the same as a one-way teleporter, except for Remote Destination.
  • Set the Remote destination keyvalue of one teleport entrance to an appropriate name (teleport_destination_1, for example) and the other entrance, to another name such as teleport_destination_2.
  • Name these brush entities something appropriate, like teleport_entrance_1 and teleport_entrance_2.


Now create 2 info_teleport_destination entities. These will be where you are teleported to.

  • Set the Name of each of them to the appropriate names thought up earlier (teleport_destination_1 and teleport_destination_2, for example).
  • Place the one teleport destination near to the entrance that does not teleport to it.
  • Place the other teleport destination near to the other teleport entrance.
Note.pngNote:This means teleport_destination_1 would be next to teleport_entrance_2, and teleport_destination_2 would be next to teleport_entrance_1
Warning.pngWarning:Make sure that no part of any info_teleport_destination entity is touching the trigger_teleport brush it is next to. If this happens, whenever you teleport, it will either fling you back through the other teleport or cause an infinite loop where you are repeatedly teleporting between the 2 destinations.
Note.pngNote:The names of these entities are not significant, but it makes it easier to understand.


Now when you step into teleport_entrance_1 you will be teleported to teleport_destination_1 and the same with teleport_entrance_2 and teleport_destination_2.


Making Teleporters Team-Specific

If you have teleporters in your map that are out in the open, and you want to make them team-specific, add 1 filter_activator_tfteam per teleporter that you are making team-specific.


Note.pngNote:You can also use other filter entities that apply to objects being teleported (filter_activator_mass_greater, for example).

External Links