Point changelevel: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎See also: Unicodifying, replaced: See Also → See also)
(Add undocumented ChangeLevelPostFade input)
Line 4: Line 4:
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.
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.


{{Note|The map does not transition instantly; an automatic 0.3 second fade to black is applied first.}}
{{Note|The map does not transition instantly; an automatic 0.5 second fade to black is applied first. Use <code>ChangeLevelPostFade</code> instead if you want to transition instantly.}}


==Keyvalues==
==Keyvalues==
Line 11: Line 11:
==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}}
{{IO|ChangeLevelPostFade|Changes the level instantly, without fading out.|param=string|nofgd=1}}
{{I BaseEntity|l4d2=1}}
{{I BaseEntity|l4d2=1}}



Revision as of 22:16, 12 February 2024

English (en)Translate (Translate)
Level Transitions

point_changelevel is an e0 available in Portal 2 Portal 2.

Warning.pngWarning:
  • The {{{game}}} parameter is inconsistent with the name defined by the {{portal2}} template. This can most likely be fixed by setting the value of the {{{game}}} parameter to Portal 2.
    If a parameter is consistent but you're still seeing this warning, it may be an issue with the template itself. Please discuss it on the template's talk page.

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.5 second fade to black is applied first. Use ChangeLevelPostFade instead if you want to transition instantly.

Keyvalues

Inputs

ChangeLevel <stringRedirectInput/string>
Changes the level to the map name supplied as a parameter.
ChangeLevelPostFade <stringRedirectInput/string> !FGD
Changes the level instantly, without fading out.


Outputs

OnChangeLevel
Fired when the level is about to change.


See also