(info) Other great resources: Official JS API docs, Scripting Forum

loadLevel()

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

 

Syntax

loadLevel(level);

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

loadLevel("CAM_1B"); // load campaign 1, mission b
This function should only be used in campaign missions.
Availability 3.1 B1+

Requires:

  • Warzone 3.1 Beta 1 or above
Contents

Jump to:

See also

Related articles:

Â