gameOverMessage()

(info) 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

Parameter

Type

Mandatory

Description

Game version

won

Boolean

Has the player won the game?

  • true – game won: "Mission Successful"

  • false – game lost: "Mission Failed"

3.1 Beta 1

Return values

Value

Type

Description

Game version

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

  •  – the video played when gameOverMessage(false) is called

  • Missions / Campaign – quick reference to JS API functions relating to missions and campaigns.

  •  – the video played when gameOverMessage(true) is called