Script:set: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Created page with "{{ScriptCommandPage |description=set a script variable |parameters= variable variable Name of the variable to set value value* Value to set the variable t...")
 
mNo edit summary
Line 1: Line 1:
{{ScriptCommandPage
{{ScriptCommandPage
|description=set a [[Script:Variables|script variable]]
|description=set a [[Script:Variables|script variable]]
|context=any
|parameters=
|parameters=
variable variable Name of the variable to set
variable variable Name of the variable to set
Line 7: Line 8:


The first character of the variable name determines the [[Script:Variables#Variable types|variable type]]. System variables (those starting with <code>^</code>) cannot be set.
The first character of the variable name determines the [[Script:Variables#Variable types|variable type]]. System variables (those starting with <code>^</code>) cannot be set.
The context entity is ignored when setting global variables.


For {{int}} and {{number}} variables, string variables passed to <code><{{Highlight|value|value}}></code> are not automatically dereferenced.
For {{int}} and {{number}} variables, string variables passed to <code><{{Highlight|value|value}}></code> are not automatically dereferenced.

Revision as of 23:04, 17 April 2020

The set script command is used to set a script variable for an entity.

Usage

set <variable> <value*>

Context: Any Entity

Parameters:

ParameterTypeDescription
variable variable Name of the variable to set
value value or variable Value to set the variable to

The first character of the variable name determines the variable type. System variables (those starting with ^) cannot be set.

The context entity is ignored when setting global variables.

For int and number variables, string variables passed to <value> are not automatically dereferenced.