Use a level change to connect
two maps: the player transits from Map1 to Map2 (sometimes back and
forth repeatedly). This technique allows you to build several smaller
maps linked together by level changes, rather than one colossal map.
Set up level changes using
trigger_changelevel
and info_landmark entities (sometimes
with additional helper entities). All level changes require these
four basic entities:
- trigger_changelevel
(Map1)
- trigger_changelevel
(Map2)
- info_landmark (Map1)
- info_landmark (Map2)
Configure the entities
like this:
- both info_landmark
entities must have the same Name (targetname)
- for example:
LM_Map1_Map2
- helpful
reminder to choose a name which indicates names of both maps,
especially when a map contains two or more level changes to
various maps
- both trigger_changelevel
entities -- set the Landmark property to your landmark name
- the trigger_changelevel
in Map1: set to the name of Map2
- This
is the name of the actual map file, e.g. SomeMap2.bsp, without
the .bsp extension
- the trigger_changelevel
in Map2: set to the name of Map1
- Map file,
e.g. SomeMap1.bsp, without the .bsp extension
The two Landmarks establish
the point of reference between the two maps, telling them where to
intersect. Landmarks define where the player will arrive when making
a level change. When the level changes, wherever the player is
relative to the Landmark in Map1, the player will arrive in the same
position relative to the Landmark in Map2. You must therefore
take care to set up your Landmarks so that the player arrives in a
safe place, not stuck in a brush or lost in the void.
Using the trigger_transition
entity
Use the optional trigger_transition
entity to control when (and if) a level change will function, and
what comes through to the destination level. Example: when a player
must activate a time-delay button, then go stand in a teleporter before
the button activates.
The trigger_transition
is a brush-type entity representing the transit
zone. It permits the level change only when the player is inside the
brush. Only those entities (e.g. monsters, pushables) which are inside
the trigger_transition brush will make the transition across levels.
Take care to provide a safe arrival zone -- anywhere inside the trigger_transition,
relative to the Landmark, must be safe for players and monsters to
arrive in the destination map.
To use trigger_transition,
set its Name (targetname) property to the name of the Landmark
associated with that level change. Also set the "Use Only"
flag, so the level change can only be activated by targeting the trigger_transition
from another entity.
You must provide an appropriate
entity to activate the trigger_transition. Set the Name (targetname)
property for this triggering entity to the name of the trigger_transition.
Using Global Entities
Use Global Entities to
simulate the effect of a single entity appearing in two maps. Global
Entities allow you to coordinate entity states between two maps, by
sending states from Map1 entities to matching entities in Map2. For
example:
- is a breakable broken?
- is a monster alive or
dead?
- are the lights flashing
and the siren wailing, or not?
Not all entities support
the Global Entity feature. Those that do have the Global Entity Name (globalname)
property. Each matched pair of Global Entities must have the same
globalname. No two pairs may share the same globalname. State trasitions
are handled automatically, but note that the trigger_relay
entity supports some interesting alternatives.
Three Varieties of Level
Change
- Seamless -
new map, same environment
- e.g. transit while
walking down a corridor
- two-way transition
- use trigger_transition
if you want to allow monsters to make the transition
- Displacement - new map,
different environment
- e.g. transit from
Earth-based teleporter to Xen
- One-Way - can't get
back
- Destination map
must have trigger_changelevel with correct reference to previous
map (even though this transition is not used). Also set the
trigger_changelevel "Use Only" flag, so player can
never accidently trigger the level change