The ChangeLevel entity is used to turn a world model into a trigger that causes a level change.
The fields for the ChangeLevel entity are:
Field | Description |
---|---|
EffectColor | Color of Effect Fog |
Font | Font to use for szMessage |
KeepAttributes | if False then drop attributes at level change |
Model | The world model used as a trigger |
SplashHold | if True then hold Splash Screen until SpaceBar is pressed |
StartPointName | Entity Name of PlayerStart to use |
szAudioFile | Name of the audio file to play while the splash screen is displayed |
szCutScene | Name of the Avi or Gif file to play before loading new level |
szEntityName | Name of this entity (used in scripting and triggers) |
szMessage | Message to display instead of Splash Screen |
szNewLevel | Name of the new level to switch to |
szSplashFile | Name of the bitmap file used as a splash screen |
Trigger | Name of the trigger entity |
TriggerChange | Name of a trigger that, when on, will force a level change |
UseAngle | if True use the Angle direction vector for the player in the PlayerStart entity |
UseEffect | if True then use Fog Effect at level change |
UseKey | if True then level change can be activated by Use key |
UseOffset | if True then offset Player at Start Position |
Model can be any world model in the level. The level change is activated by the player colliding with this model.
If the state of the Trigger entity is off then the level change will not occur on collision and a callback will be generated that can be converted to a trigger by a LogicGate entity. If the state of TriggerChange is on then a level change will be forced, regardless of the state of Trigger.
If a name is entered in the szCutScene entry then that AVI file is played immediately after initiating the level change. If no name is present then the cutscene sequence is skipped.
The Splash screen is displayed and the sound is played immediately after the cutscene and while the level is being loaded. If no bitmap name is provided the splash screen sequence is skipped. If no Splash screen is used the text message, if present, will be displayed in the center of the screen while the level is loaded.
It is possible to define a list of splash screens and have one of them randomly chosen when you do a level change. An INI file called splash.ini has to be added to the install directory that contains the lists of splash screens. It has the usual INI file format of a section name enclosed in [ and ] and a list of splash screen bitmaps defined for that section.
For example:
[SplashTest]
chnglevl.bmp
rflogo.bmp
highradi.bmp
storage.bmp
defines a section named SplashTest
that has 4 splash screen bitmaps defined in
it. To use the list of splash screens rather than a specific bitmap simply put
the section name in the szSplashFile entry. If the name does not have a BMP
extension it is assumed to be a section name defined in the splash.ini file.
The name of the level entered in szNewLevel must be that of a level's BSP file and have the BSP extension on it. Otherwise the current level will end and you will be returned to the main menu.
When UseOffset is true the distance between the players position and the ChangeLevel entity is calculated and this distance is applied to the PlayerStart position in the next level. This allows the player to start a level in the same relative position as it exited.
If StartPointName is not blank then the player will start the next level at the PlayerStart entity whose name matches StartPointName. If no name match is found then the default (unnamed) PlayerStart entity is used. If the UseAngle flag is true then point the player in that direction at level start.
A fog effect can be shown at the start of a level if UseEffect is set to true. The color of the fog is controlled by EffectColor. Nothing happens in the level while the fog is being shown and can be used to give the player a momentary pause.
Here are some examples of the ChangeLevel entity.
|
|