PDA

View Full Version : Seamless Teleports



JPolito
19-03-2016, 03:59 PM
Introduction

Seamless teleports are incredibly useful for connecting two maps that would otherwise overlap with each other, or connecting two sections in a map that would otherwise be impossible to connect. These are frequently used in Sven Co-op's Half-Life campaign due to the tendency of the original Half-Life maps to overlap on the grid, which was not noticeable due to changelevel triggers between maps.

Here is an example of a seamless teleport in action:
https://youtu.be/PPq6SDftTYo

<iframe width="560" height="315" src="https://www.youtube.com/embed/PPq6SDftTYo" frameborder="0" allowfullscreen></iframe>



<hr></hr>
Setting up the teleports

Note: This tutorial assumes that you already know how to set up a trigger_teleport and its corresponding info_teleport_destination.

I'm going to use the Half-Life Hazard Course as an example (see the video in the introduction). There are two maps that I needed to connect, which overlayed each other on the grid when directly connected. I decided to place a seamless teleport where a trigger_changelevel would normally be in the original maps. Players would walk down a hallway, the level would change, and the new area would be accessible.

<img src="http://www.svencoop.com/jpolito/images/tutorial_seamlessteleports/overview3.png">

The first thing I do is create a trigger_teleport brush with an origin brush. The origin brush allows the teleport to move players relative to their position on entry to the teleport. Do this for one hallway, then make a second trigger_teleport brush with an origin brush in the connecting hallway. Place the origin brush in the exact spot where the first origin is located, but in the connecting hallway. Make sure that when players teleport to the new area, they do not immediately enter the trigger_teleport that sends them in the reverse direction. Doing so will result in an infinite teleport loop. The teleport brushes must not overlap, but the origins must be in the same place relative to the hallway.

At the center of both of the origin brushes, place an info_teleport_destination. The trigger_teleport target should be set to the name of the info_teleport_destination in the opposite hallway.

It should look like this on one side of your teleport:

<img src="http://www.svencoop.com/jpolito/images/tutorial_seamlessteleports/overview5.png">

Configure the trigger_teleport entities as follows:

<img src="http://www.svencoop.com/jpolito/images/tutorial_seamlessteleports/trigger_flags.png">

Flags:

Relative Teleport
Keep Angles
Keep Velocity


Keyvalues:

"Ignore Delays" (teleport_ignore_delay) should be set to Yes (1).
"Teleport If Blocked" (teleport_if_blocked) should be set to Yes (1).


I also usually set the "Teleport Cooldown Delay" (teleport_cooldown) keyvalue for both the trigger_teleport and the info_teleport_destination to 0, although "Ignore Delays" set to "Yes" on the trigger_teleport should take care of that.

This is how players will flow through the hallway once the teleports are complete:

<img src="http://www.svencoop.com/jpolito/images/tutorial_seamlessteleports/overview2.png">

Players walking through the teleport on the lower side (represented by the orange arrow) will teleport to the upper hallway relative to their position upon walking into the teleport. The green arrow shows players walking through the upper teleport and through to the lower hallway.

As long as the lighting and texture alignments are identical on both sides of the teleport, players will never notice that they're being shifted to a new place on the grid (aside from possibly seeing other players pop in and out of existence as they walk through the teleport.



<hr></hr>
Other Uses

I have also used this method to create the seamless teleport airlocks in hl_c05_a2 (Blast Pit), which teleports players back and forth between the inside and outside of the rocket test silo. I may someday create a second tutorial on setting this up, but all that you need to do is set up a multimanager that makes sure both doors on either side of the airlock are closed and turns the teleport on in one direction (depending on which button/lever is used and on which side players are trying to transfer to).

This also works quite well for Half-Life's level-change elevators. See this video:
https://youtu.be/74Kn06Y8PKg

<iframe width="560" height="315" src="https://www.youtube.com/embed/74Kn06Y8PKg" frameborder="0" allowfullscreen></iframe>

It is also possible to turn players to face a new direction by setting the "Rotate (Dest Angle)" flag on the trigger_teleport, and set the yaw-angle of the info_teleport_destination entity to rotate players to face a new direction. Fancy fancy.

Let me know if any of this tutorial needs clarification, or if you need assistance with any of the setup.

Fin.

BlueSpark
19-03-2016, 04:28 PM
Nice clear, thorough tutorial, detailing a useful concept. Smart diagrams - Good job!

Nih
19-03-2016, 08:42 PM
Nice tutorial. I wouldn't use this unless absolutely necessary though, as you will be able to see other players spontaneously disappear in front of you when they enter the teleport, though.

JPolito
20-03-2016, 02:16 AM
Definitely works best with the airlock or elevator method if you want to avoid players seeing other people teleport in/out of an area. The system has no issue teleporting any number of players (or monsters, or pushables, or anything else) simultaneously.

BlueSpark
20-03-2016, 04:00 AM
Wouldn't be so effective if there was a bunch of players fighting a horde of monsters on the 'other side' and you just strolled into it from the middle of an empty corridor..

Maestro FĂ©nix
20-03-2016, 05:26 AM
Nice clear, thorough tutorial, detailing a useful concept. Smart diagrams - Good job!

Nice indeed, is all well explained. However I have a question:

If a player uses the spray, it will know that he teleported into a new area. There's a way to disable them at the map/CFG?

JPolito
20-03-2016, 10:34 AM
Wouldn't be so effective if there was a bunch of players fighting a horde of monsters on the 'other side' and you just strolled into it from the middle of an empty corridor..

The idea is that you shouldn't use this in an area where that would be happening.

w00tguy123
20-03-2016, 12:30 PM
How about exploiting that "bug" with copied brushes? Convert the surrounding area to a func_wall (but enclosed with null world brushes), and then use copy of that brush model in the other area. The decals will be identical on both sides.

After that, go to crazy-extreme levels and create NPC and player puppets (copy origin/velocity/angles from the "real" ents) on the "fake" sides of each teleport to create the illusion that stuff is actually over there. I think that might be possible with AS but it might be pretty hard to do.

SourceSkyBoxer
20-03-2016, 12:56 PM
Wow nice hack to changelevel like BlueSpatk said. I don't know that. Nice trick, thanks for tips. But how does change sky :/ If you build Half-Life maps after reactor than oooops wrong sky into xen since reactor. Hahaha! It is really stupid together building so sad.

Look like Cry of Fear maps xD

PS: Nice trick I have tested if i shoot black point to wall. than i move next room that is why black point is stayed in 1st room and 2nd room not. Hahahaha! How do you know like Cry of Fear if player goes to faked door than next room do not need to open door just teleport to next room hahaha i know that.

BlueSpark
20-03-2016, 02:30 PM
How about exploiting that "bug" with copied brushes? Convert the surrounding area to a func_wall (but enclosed with null world brushes), and then use copy of that brush model in the other area. The decals will be identical on both sides.

Interesting trick! Making a usually undesirable behaviour into a feature.. nice! I guess the clone would have to encompass the teleport completely, or there may be issues with a spray straddling the threshold.. but that's getting pretty esoteric..

Nero
05-05-2016, 06:28 AM
Ooooohh, this is awesome! :o
I was wondering what happens when going through the silo doors