Trigger changelevel: Difference between revisions
mNo edit summary |
|||
Line 4: | Line 4: | ||
==Entity Description== | ==Entity Description== | ||
A [[brush entity]] that triggers a level change. | A [[brush entity]] that triggers a level change. | ||
{{sensor_brush}} | |||
Place an [[info_landmark]] in both maps to mark the ''same'' location in both maps. | Place an [[info_landmark]] in both maps to mark the ''same'' location in both maps. |
Revision as of 19:15, 10 May 2008
Template:Wrongtitle Template:Base brush
Entity Description
A brush entity that triggers a level change.
Place an info_landmark in both maps to mark the same location in both maps.
Notes
To fire events in the next level, use the OnChangeLevel output to turn on an env_global in the current level. Create a logic_auto in the next level that checks for the state set by the env_global.
To control which entities go through the level transition, create one or more trigger_transitions and give them the same name as the landmark. Any entities within the trigger_transition(s) will go to the next map.
Level transitions must be two-way. That is to say, there must be a trigger_changelevel in the next level that points to the current level, as well as the trigger_changelevel taking the player to the next level. If a one-way level transition is desired, simply make this second trigger_changelevel inaccessible to the player.
The info_landmark must be in the player's PVS when the level change is triggered. If it is not, the level change will fail.
Although the info_landmark should be in a corresponding position in both levels, the two trigger_changelevel brushes must NOT be in the same place in each level. If they are, you will be thrown into an infinite loop, endlessly ping-ponging back and forth between the two levels.
Availability
Template:In game Template:Game-base Template:In code
Keyvalues
- targetname
- <target_source> Name.
- map
- <string> New Map Name.
- landmark
- <target_destination> Landmark Name.
Flags
- 2 : Disable Touch
- 4 : To Previous Chapter
Inputs
- ChangeLevel
- Cause the level change. Use this when triggering the level change with a button, etc.
Outputs
- OnChangeLevel
- Fired when the level changes.