Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Comment:
Migrated to Confluence 5.3
Excerpt |
---|
Mark the current mission as complete and start a new level in a campaign... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
loadLevel(level |
...
Load the level with the given name.
...
); |
Parameters
Parameter | Type | Mandatory | Notes | Game Version |
---|---|---|---|---|
level | String | 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 | ||||||
---|---|---|---|---|---|---|
| ||||||
loadLevel("CAM_1B"); // load campaign 1, mission b |
Div | ||
---|---|---|
| ||
This function should only be used in campaign missions. |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||
---|---|---|
| ||
See alsoRelated articles:
|