Script:inc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
|parameters= | |parameters= | ||
variable variable Name of the variable to add to | variable variable Name of the variable to add to | ||
value number Value to add to the variable | value number* Value to add to 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. | 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 18:35, 2 June 2022
The inc
script command is used to add a value to a number
or int
script variable for an entity.
Usage
inc <variable> <value*>
Context: Any Entity
Parameters:
Parameter | Type | Description |
---|---|---|
variable |
variable |
Name of the variable to add to |
value |
number or variable |
Value to add to 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.