Script:inc: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ScriptCommandPage
{{ScriptCommandPage
|description=add a value to a [[Script:Variables|script variable]]
|description=add a value to a {{number}} or {{int}} [[Script:Variables|script variable]]
|context=any
|context=any
|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.
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 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:

ParameterTypeDescription
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.