Skip to main content

Arrays

An array holds lists of values stored in a single place.

An array lets you store and manage multiple pieces of related data — like player inventory, completed levels, or selected dialogue options, etc. All that without creating a separate variable for each piece of information.

What Is an Array?

You can think of an Array as a row of boxes, each holding one value.

Each position in the array is called an index.

IndexValue
010
120
230
340

Indexes start at 0, so the first element is at position 0.

Creating an Array

You can create an array with the Array Create event, it can be normal or global.

Global Arrays

Global arrays are not destroyed between scene changes, they exist on memory until they are released with Array Release event.

Debugging Arrays

You can view the created arrays in the Arrays Pane of the debugger window.

Saving / Loading Arrays

You can save / load arrays with the Game Data Process Array event.