Other great resources: Official JS API docs, Scripting Forum
gameOverMessage()
Overview
End the game in either victory or defeat. The game rules (rules.js) determine when a game is over and call this function accordingly.
Availability
Warzone 3.1 Beta 1 and above.
Syntax
var returnValue = gameOverMessage(won);
Parameters
Parameter | Type | Mandatory | Description | Game version |
---|---|---|---|---|
won | Boolean | Has the player won the game?
| 3.1 Beta 1 |
Return values
Value | Type | Description | Game version |
---|---|---|---|
undefined | Undefined | The function does not return a value. | 3.1 Beta 1 |
Example
See the checkEndConditions function in rules.js.
See also
- end.ogg – the video played when gameOverMessage(false) is called
- Missions / Campaign – quick reference to JS API functions relating to missions and campaigns.
- victory.ogg – the video played when gameOverMessage(true) is called