Define Array
DefineArray
Defines an array with values that can be used in expressions.
Note: Range checking of arrays are only performed inside the designer tool, so be sure to test your game that use arrays in preview mode before generating a exe-file.
Properties
Name
The name of the array. This is the name that can be used in expressions.
Dimensions
This property can be set to one of the following values:
- One - A one dimensional array. Example expression syntax "MyArray[4] = 1;"
- Two - A two dimensional array. Example expression syntax "MyArray[4, 1] = 1;"
- Three - A three dimensional array. Example expression syntax "MyArray[4, 1, 2] = 1;"
Type
The data type of the array elements.
- Float
- Integer
- String
SizeDim1
Number of elements in the first dimension. For instance a SizeDime1 value of 2 with dimensions set to One defines an array with two elements that can be accessed with index 0 and 1. This value can only be set at runtime.
SizeDim2
Number of elements in the second dimension. This value can only be set at runtime.
SizeDim3
Number of elements in the third dimension. This value can only be set at runtime.
Persistent
With a persistent array, values are stored in your project file, and thus can contain data other than 0 upon start. Values can then be changed with code during runtime.
When editing a persistent array, the values can be copied to a text editor, edited, and pasted back into the component.
ZGameEditor
Documentation
- Contents
- Overview
- Tutorial 1
- Tutorial 2
- Tutorial 3
- Sample projects
- Component reference
- Writing expressions
Community