Help Home

Tutorials

Weapon Scr. I
Weapon Scr. II
Missions

Reference

All Commands
General
Load/Add
Graphics
HUD
Sounds
Player
Terrain
Projectiles
Particles
Collision
Objects
AI
Nodes
Missions

Commands: missions

Legend

  • X - X is a number
  • 'X' - X is a string (a letter/word/text)
  • [X=0] - X is an optional parameter with value 0 when omitted (NEVER add [] to your script!)
  • hard sync - command is hard synced

cooldown()

This command is relevant for weapons which are used in missions only. It starts the weapon cooldown which resets the weapon state and allows usage of more weapons.
The cooldown is also triggered by the command "endturn". So you do not need to care about it in most cases.
Some weapons though might need an extra call of this command to work properly in the mission mode.

The cooldown times can be specified in the mission cfg-files (where you specify the weapons for the mission). The default cooldown time is 1000 ms (1 second).

Please note that all mission commands like this one do only work in the mission mode! This command does not do anything in multiplayer modes.

cutscene()

Enable the cutscene mode which hides the user interface and disables player control.
Call this command in each frame were you want the cutscene mode to be enabled. Also use update functions to call this command, NOT draw functions!

Please note that all mission commands like this one do only work in the mission mode!

getscore([BEST=0])

Parameters:
[BEST=0] - get the best score (1) or the current score (0)
Returns:
SCORE - the current/best high score
Gets the current or the best high score of the current mission. High scores are always integers (no floats).

inmission()

Returns:
MISSION - 1 if in a mission, else 0
Returns 1 if player is currently in a mission (playing single player missions) and otherwise 0. Can be useful for certain weapons which need to have another behavior in missions.

setscore(SCORE, [SAVE=0])

Parameters:
SCORE - the high score
[SAVE=0] - force to save this as new best score (1) or not (0)
Sets the new high score. You can use SAVE to force the game to save that score as new best high score - no matter if the current best score is actually lower or higher!

Note: The high score will automatically be saved as best high score when the mission ends and if it is better then the current best high-score.

win()

End the current mission-map and load/unlock the next map of that mission (if there is any).

Please note that all mission commands like this one do only work in the mission mode!