trigger_teleport

From Source Entities
Jump to navigation Jump to search

Code classes:

Trigger.png

trigger_teleport is a brush entity present in all Source games. It teleports objects to another place.

Note: In older games, teleported objects will lose their linear velocity (but not angular). Bug: players however, don't lose any velocity.

Bug: Objects being physically held in the player's hands or by the gravity gun will not immediately disconnect and will look odd.

Bug: Flags 64-4096 don't show up in Hammer if the FGD contains the one below!

Flags[edit | edit source]

  • 32: Preserve angles even when a local landmark is not specified (only available in games before Asw.png) - If checked, teleported objects will keep their angles that they had before being teleported, as opposed to snapping to the angles of the Remote Destination.
Bug: When checked, flag 32 from CBaseTrigger (Only clients in vehicles) is also checked!
Fix: Changing this flag to 8192 in code should fix it. If changing code is not an option, you can specify !activator in Local Destination Landmark to do this behavior.

Keyvalues[edit | edit source]

Remote Destination (target) <target_destination>
Where to teleport entities to. Usually an info_target.
Tip: The trigger itself can be specified here to move entities to its origin.
Local Destination Landmark (landmark) <target_destination>
If specified, the entity will note the position of teleported objects relative to this entity, and then teleport entities to the same position relative to Remote Destination. Also preserves the entity's angles and velocity.
Use Landmark Angles (UseLandmarkAngles) <boolean> (available in all games since Asw.png)
Forces the teleported object to the angles of the Local Destination Landmark. Note: The trigger will apply a "rotation" independent from this one which is determined by the difference in the angles of the destination and landmark entities.
Only Spawn-Valid Destinations (CheckDestIfClearForPlayer) <boolean> (only available in Csgo-small.png)
Only teleports the object to its new destination if there's space for it.

Inputs[edit | edit source]

SetRemoteDestination <target_destination> (available in all games since P2.png)
Sets Remote Destination.

See Also[edit | edit source]