VERC: Basic Teleporter with Effects Last edited 4 months ago2019-04-22 00:49:36 UTC by Penguinboy Penguinboy

Basic Teleporter with Effects

Teleporters with sprite and sound effects are quite easy to construct.

First thing's first, make something that looks like a teleport pad. (Well, you don't need to, but come on, it's fun). Below you can see my attempt at making the pad. The main texture there is the C3A2_TELEPAD ... fitting, no? :)
User posted image
The telepads in Half-Life also usually had some type of glowing sprite effect associated with them as well. We'll add that now too. Place an env_sprite a little above the telepad. For reference, in the example map there are 28 units between the top of the telepad and the center of the env_sprite. Below are the properties you'll need to set (those not mentioned can be left at their default). You should now have something similar to what's pictured below.
User posted image
User posted image
Ok, so now you have a pair of telepads (you made one for the destination too, right?) that look right, but that's about it. Before we go on to the actual teleportation effect, we'll setup a sound effect as well. Place an ambient generic above each telepad. Set their properties as outlined below. Ok, now the secondary effects are in place. Time to move on to making this a working teleporter. This requires, for a start, two things - the trigger_teleport trigger area, and an accompanying info_teleport_destination which, of course, determines where the player will end up when he teleports.

Place the info_teleport_destination entity over the destination telepad. Set its angle to the direction you want the player to be facing after he teleports. Set the Name (targetname) to tele1_dest. That's the destination done with.
User posted image
Now, for the teleporter. Create a trigger_teleport brush directly over the telepad. Set its Target (target) to tele1_dest. For now, this is all you need to do, if you want to test that it works. If you compile and run this now, you will be able to walk into the teleporter and come out at the destination. However, the sounds won't be played. We'll cover this next.
User posted image
First, create a multisource entity somewhere close to the trigger_teleport brush. In the multisource properties, set the Name (targetname) to tele1_master. Now, in the trigger_teleport properties, set the Master (master) to tele1_master. This will make the trigger_teleport active only when the multisource state is on (it starts off by default).

If you tested the map now, nothing would work, because there isn't any way for the multisource to be turned on. To remedy this, create a multi_manager near the multisource. Give it a Name (targetname) of tele1_mm, then turn off SmartEdit and give it the following keys and values. When its activated, the multi_manager will immediately activate the ambient_generic sound effects, while at the same time turning on the multisource. This will enable the trigger_teleport, teleporting the player to the destination. 0.01 seconds later, the multisource will again be activated, turning it off and disabling the trigger_teleport.
User posted image
The final thing we need to do is provide a trigger that will activate the multi_manager and get the whole thing rolling. Create a trigger_multiple in the same area as the trigger_teleport (see picture above). Set the Target (target) to tele1_mm. Set the Delay before reset (wait) to 0.5. This means that, every 0.5 seconds, the tele_mm multi_manager will get triggered (as long as the player is standing in the trigger). In practice, this means that the teleporter will be usable once every 0.5 seconds, since the player will not be standing in the trigger after it gets activated once.

So, to wrap it up, the events will occur as follows- You might be wondering, why use a multisource to turn the trigger_teleport on and off? If you used the trigger_multiple to activate the ambient_generics, and layer it over the trigger_teleport, most of the time the trigger_teleport will take effect before the trigger_multiple notices the player. Setting it up the way its described in this tutorial allows you to easily add events to be triggered when the player teleports. For example, you might also want to use an env_fade to create a flash when the teleport takes effect.

Example Map

This article was originally published on the Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

1 Comment

Commented 2 weeks ago2019-08-30 23:43:48 UTC Comment #102235
Thanks! Used this for my in-progress DarkRP map rp_downtown_thepublic.

You must log in to post a comment. You can login or register a new account.