Script:dec: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{ScriptCommandPage |description=subtract a value from a script variable |parameters= variable variable Name of the variable to subtract from value number...") |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
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 | |||
|parameters= | |parameters= | ||
variable variable Name of the variable to subtract from | variable variable Name of the variable to subtract from | ||
value number Value to subtract from the variable | value number* 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. | |||
[[Category:Script commands changing variables]] |
Latest revision as of 21:19, 8 July 2022
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:
Parameter | Type | Description |
---|---|---|
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.