Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Mark the current mission as complete and start a new level in a campaign...

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
loadLevel(level

...

Load the level with the given name.

...

);

Parameters

ParameterTypeMandatoryNotesGame Version
levelString(tick)The level to load, as defined in the campaign data. For more information see Creating a Mission.3.1 Beta 1

Return value

Does not return anything.

Notes

This function is used to indicate a successful mission and then progress to the next mission in a campaign.

When the function is called, a game results screen will be shown similar to if you had called gameOverMessage(). The user is given the opportunity to save the game, and can then "Continue" to progress to the specified level. The new level will then be loaded in to a fresh script environment.

If the player fails the mission, use gameOverMessage() instead.

Example

Code Block
themeRDark
languagejavascript
linenumberstrue
loadLevel("CAM_1B"); // load campaign 1, mission b
Div
classnotice box ping

This function should only be used in campaign missions.

Div
classbox
Availability
Status
colourGreen
title3.1 b1+

Requires:

  • Warzone 3.1 Beta 1 or above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

See also

Related articles: