Point changelevel: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added Lang template. Added back button. Added links.)
(Use BaseEntity templates, document landmark behavior)
Line 2: Line 2:
{{stub}}
{{stub}}
{{back|Level Transitions}}  
{{back|Level Transitions}}  
{{portal2 point|point_changelevel}}  
{{portal2 point|point_changelevel}} Used to make an easy, one-way map transition. If no landmarks are present in the map, the player will spawn at the [[info_player_start]] in the destination map.


==Entity description==
However, if the current map contains an {{ent|info_landmark_exit}} and the destination map contains an {{ent|info_landmark_entry}}, the player's offset relative to the exit landmark will be applied relative to the entry landmark in the next map. Effectively, this makes the entity behave more like a {{ent|trigger_changelevel}}. This will also cause '''all''' entities to transition over; to limit what entities this applies to, use a {{ent|trigger_transition}}. In the Portal 2 campaign, this is positioned in such a way that no entities are ever inside it.
Used to make an easy, one-way map transition. No [[info_landmark]] or trigger brushes are needed. They [[player]] will spawn at [[info_player_start]] at the destination map.


{{Note|Portal 2 maps trigger this entity after a fade out using a [[env_fade]] entity set to 0.3 seconds.}}
{{Note|The map does not transition instantly; an automatic 0.3 second fade to black is applied first.}}


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV BaseEntity|l4d2=1}}


==Inputs==
==Inputs==
{{IO|ChangeLevel|Changes the level to the map name supplied as a parameter.|param=string}}
{{IO|ChangeLevel|Changes the level to the map name supplied as a parameter.|param=string}}
{{I Targetname}}
{{I BaseEntity|l4d2=1}}


==Outputs==
==Outputs==
{{IO|OnChangeLevel|Fired when the level is about to change.}}
{{IO|OnChangeLevel|Fired when the level is about to change.}}
{{O Targetname}}
{{O BaseEntity}}


== See Also ==
== See Also ==

Revision as of 18:59, 14 June 2022

English (en)Translate (Translate)

Stub

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

Level Transitions

Template:Portal2 point Used to make an easy, one-way map transition. If no landmarks are present in the map, the player will spawn at the info_player_start in the destination map.

However, if the current map contains an info_landmark_exit and the destination map contains an info_landmark_entry, the player's offset relative to the exit landmark will be applied relative to the entry landmark in the next map. Effectively, this makes the entity behave more like a trigger_changelevel. This will also cause all entities to transition over; to limit what entities this applies to, use a trigger_transition. In the Portal 2 campaign, this is positioned in such a way that no entities are ever inside it.

Note.pngNote:The map does not transition instantly; an automatic 0.3 second fade to black is applied first.

Keyvalues

Inputs

ChangeLevel <stringRedirectInput/string>
Changes the level to the map name supplied as a parameter.


Outputs

OnChangeLevel
Fired when the level is about to change.


See Also