User Tools

Site Tools


script_syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
script_syntax [2020/02/18 17:37] justinscript_syntax [2020/02/18 17:38] justin
Line 118: Line 118:
  
 ====Arrays==== ====Arrays====
-An array is simply a list of values, such as the [[entity|entities]] belonging to a [[groups|group]], the tags assigned to a model, or even a custom set of values defined directly within a [[script]]. Refer to the [[Array]] documentation for more examples.+An [[array]] is simply a list of values, such as the [[entity|entities]] belonging to a [[groups|group]], the tags assigned to a model, or even a custom set of values defined directly within a [[script]]. Refer to the [[Array]] documentation for more examples.
 ^Type^Description^Example^ ^Type^Description^Example^
 |User-Defined|List of custom values declared with the "array" syntax.|array["A", "B", "C"]| |User-Defined|List of custom values declared with the "array" syntax.|array["A", "B", "C"]|
Line 126: Line 126:
 |Tags for an Entity|List of tags assigned to an [[entity|entity's]] model (see [[Model Properties]]).|player.tags, initiator.tags| |Tags for an Entity|List of tags assigned to an [[entity|entity's]] model (see [[Model Properties]]).|player.tags, initiator.tags|
  
-The values in an array can be iterated through using a "For" loop, or you can get the value at a specific position within the array using the index syntax //my_array[x]//, where "my_array" is an [[array]] variable and "x" is an integer ranging from 0 to one less than the [[array]] size. See below for some example script usages.+The values in an [[array]] can be iterated through using a "For" loop, or you can get the value at a specific position within the [[array]] using the index syntax //my_array[x]//, where "my_array" is an [[array]] variable and "x" is an integer ranging from 0 to one less than the [[array]] size. See below for some example [[script]] usages.
  
 **Examples:** **Examples:**
script_syntax.txt · Last modified: 2023/11/06 14:13 by justin