Script:dec: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{ScriptCommandPage
{{ScriptCommandPage
|description=subtract a value from a [[Script:Variables|script variable]]
|description=subtract a value from a {{number}} or {{int}} [[Script:Variables|script variable]]
|context=any
|context=any
|parameters=
|parameters=
Line 7: Line 7:
}}
}}


The context entity is ignored when modifying global variables. System variables (those starting with ^) cannot be modified.
The context entity is ignored when modifying global variables. System variables (those starting with ^) cannot be modified and {{string}} variables cannot be used in arithmetic.

Revision as of 23:52, 17 April 2020

The dec script command is used to subtract a value from a number or int script variable for an entity.

Usage

dec <variable> <value>

Context: Any Entity

Parameters:

ParameterTypeDescription
variable variable Name of the variable to subtract from
value number or variable Value to subtract from the variable

The context entity is ignored when modifying global variables. System variables (those starting with ^) cannot be modified and string variables cannot be used in arithmetic.