This article's documentation is for anything that uses the Source engine. Click here for more information.

Trigger transition: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(31 intermediate revisions by 19 users not shown)
Line 1: Line 1:
The One-Way Transition
{{LanguageBar}}
A one-way transition is any transition where you go from the origin map to the destination map, but you cannot return to the origin map. This is the type of transition that usually gives people headaches. Logic would seem to tell you that you don't need a trigger_changelevel in the destination map, just the info_landmark. For some reason, this isn't correct. The destination map must have a trigger_changelevel in it that correctly references the previous map in the New Map Name property, and identifies the info_landmark in the Landmark Name property.
{{subpage|[[Level Transitions]]}}
{{CD|CTriggerVolume|file1=triggers.cpp}}
{{this is a|brush entity|name=trigger_transition}}
It controls which [[entity|entities]] go through a [[Level Transitions|level transition]]. Trigger_transitions should be named the same as the {{ent|info_landmark}} which is associated with a particular [[trigger_changelevel]]. Any entities which are within the trigger_transition brush volume will then go to the next map. The [[player]] must also be inside the brush volume.


The example map below demonstrates a one-way transition, modeled loosely after the Star Trek teleportation style. The transition is setup like the above displacement transition, except that the trigger_changelevel is a small cube positioned just above the info_landmark (to keep easy track of it), and its "USE Only" flag is set so that it will never accidentally be activated by the player.
In {{portal2|2}}, transition triggers can also be used with {{ent|point_changelevel}}. In this case, the entity does not need to be named.
__NOTOC__
{{Note|Not used for {{l4ds|4}} transitions}}
 
== Keyvalues ==
{{KV Targetname}}
 
== See also ==
* [[Level Transitions]]
* {{ent|info_landmark}}
* {{ent|trigger_changelevel}}
* {{ent|point_changelevel}} {{portal2|only}}
* {{ent|info_changelevel}} {{l4ds|only}}
 
{{sensor brush}}

Latest revision as of 17:44, 15 March 2025

English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CTriggerVolume
CPointEntity
CBaseEntity
C++ triggers.cpp

trigger_transition is a brush entity available in all Source Source games. It controls which entities go through a level transition. Trigger_transitions should be named the same as the info_landmark which is associated with a particular trigger_changelevel. Any entities which are within the trigger_transition brush volume will then go to the next map. The player must also be inside the brush volume.

In Portal 2 Portal 2, transition triggers can also be used with point_changelevel. In this case, the entity does not need to be named.

Note.pngNote:Not used for Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series transitions

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

See also