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 revision
Previous revision
Next revisionBoth sides next revision
script_syntax [2021/05/05 12:37] justinscript_syntax [2021/11/04 19:35] justin
Line 112: Line 112:
  
 =====Data Types===== =====Data Types=====
-There are several data types available in the scripting language used to represent a value or, in the case of arrays, a collection/list of values. These values can be stored in variables or properties (see assignment statements above, or [[Set Global Property]] and [[Set Entity Property]]), and can be compared to another value of the same type using a [[conditional expression]].+There are several data types available in the scripting language used to represent a value or, in the case of an array or codex, a collection/list of values. These values can be stored in variables or properties (see assignment statements above, or [[Set Global Property]] and [[Set Entity Property]]), and can be compared to another value of the same type using a [[conditional expression]].
  
 ^Type^Examples^ ^Type^Examples^
Line 121: Line 121:
 |[[Color]]|color[255, 0, 255]| |[[Color]]|color[255, 0, 255]|
 |[[Entity]]|player, self, entity["sign"]| |[[Entity]]|player, self, entity["sign"]|
-|[[Array]]|group["room_01"], self.groups|+|[[Array]]|array["A", "B", "C"], group["room_01"], self.groups
 +|[[Codex]]|codex["id": "ITEM_0001", "count": 5]|
 |Null|null| |Null|null|
  
-====Arrays====+====Array====
 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, as well as information about the available functions that can be used to manipulate an [[array|array's]] values. 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, as well as information about the available functions that can be used to manipulate an [[array|array's]] values.
 ^Type^Description^Example^ ^Type^Description^Example^
Line 155: Line 156:
 </code> </code>
 Loads a random map from the "dungeon_map_list" array variable ("room1" through "room4"), then gives the player 5 of a random item from the "item_list" array variable. Loads a random map from the "dungeon_map_list" array variable ("room1" through "room4"), then gives the player 5 of a random item from the "item_list" array variable.
 +
 +====Codex====
 +(Coming soon)
  
 ====Null==== ====Null====
script_syntax.txt · Last modified: 2023/11/06 14:13 by justin