> For the complete documentation index, see [llms.txt](https://wiki.thescriptersguild.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.thescriptersguild.com/scripting/nodes/variables-advanced/object-list-variable.md).

# Object List Variable

{% hint style="info" %}
**All variables require a Declare**

Each Variable type has a Declare, a Set, and a Get node. Variables must be declared to be recognized by their get and set nodes, which must use the same custom identifier and scope. See infos for all three below.
{% endhint %}

## Declare Object List Variable

![](https://692276616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN06Vv6nlwviUQ4hI2Kkd%2Fuploads%2Fgit-blob-2e4abd378d2dc6d8b127cfd1c89a148ba0fffa3a%2Fdeclare-object-list-variable.JPG?alt=media)

## Description

Declare an Object List variable with a custom Identifier. Variable declarations do not require an event node to trigger. They are automatically performed when the node graph script is run.

## Node Type

Nodes fall into two basic categories: Data and Execution. This node Executes a function when the game loads.

## Inputs

| Input         | Type        | Required | Description                                                                                                                                                                                                             |
| ------------- | ----------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Identifier    | String      | Yes      | The custom string id for this variable.                                                                                                                                                                                 |
| Initial Value | Object List | No       | What the variable holds when the game starts.                                                                                                                                                                           |
| Scope         | Scope       | Yes      | Local scope can only be accessed within the same script brain. Global and Object can be accessed by any script brain. Object scoped variables use the Object pin, to associate the variable with an object in the game. |

## Outputs

| Output | Type | Description |
| ------ | ---- | ----------- |
| (none) |      |             |

***

***

## Get Object List Variable

![](https://692276616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN06Vv6nlwviUQ4hI2Kkd%2Fuploads%2Fgit-blob-58b26ca63b2c346619fe39263072fde4756c8cf4%2Fget-object-list-variable.JPG?alt=media)

## Description

Get the Object List variable stored with the matching Identifier in the matching Scope. The Object pin is only used when accessing the Object scope.

## Node Type

Nodes fall into two basic categories: Data and Execution. This node supplies Data for an Execution node.

## Inputs

| Input      | Type   | Required | Description                                                          |
| ---------- | ------ | -------- | -------------------------------------------------------------------- |
| Identifier | String | Yes      | The custom string id for this variable.                              |
| Scope      | Scope  | Yes      | Must match scope of declared variable with the same identifier.      |
| Object     | Object | No       | Used to associate variable with an object when Object scope is used. |

## Outputs

| Output | Type        | Description                     |
| ------ | ----------- | ------------------------------- |
| Value  | Object List | Current value of this variable. |

***

***

## Get Object List Variable Without Refresh

![](https://692276616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN06Vv6nlwviUQ4hI2Kkd%2Fuploads%2Fgit-blob-85fed1aca224546dc4397c1e80ffb7af6b29a9bb%2Fget-object-list-variable-without-refresh.png?alt=media)

## Description

This node works similarly to **Get Object List Variable**. This version of the node is meant to be used with objects created through the **Spawn Mode Object** node, particularly when an object reference is used to make multiple copies of an object, and they are later stored as variables.

## Node Type

Nodes fall into two basic categories: Data and Execution. This node supplies Data for an Execution node.

## Inputs

| Input      | Type   | Required | Description                                                          |
| ---------- | ------ | -------- | -------------------------------------------------------------------- |
| Identifier | String | Yes      | The custom string id for this variable.                              |
| Scope      | Scope  | Yes      | Must match scope of declared variable with the same identifier.      |
| Object     | Object | No       | Used to associate variable with an object when Object scope is used. |

## Outputs

| Output | Type        | Description                     |
| ------ | ----------- | ------------------------------- |
| Value  | Object List | Current value of this variable. |

***

***

## Set Object List Variable

![](https://692276616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN06Vv6nlwviUQ4hI2Kkd%2Fuploads%2Fgit-blob-43fab144ccdc8f2da412e17680dc62a00f9a5c99%2Fset-object-list-variable.JPG?alt=media)

## Description

Set the Object List variable stored with the matching Identifier in the matching Scope. The Object pin is only used when accessing the Object scope.

## Node Type

Nodes fall into two basic categories: Data and Execution. This node Executes a function directly in the node string.

## Inputs

| Input      | Type        | Required | Description                                                          |
| ---------- | ----------- | -------- | -------------------------------------------------------------------- |
| Identifier | String      | Yes      | The custom string id for this variable.                              |
| Value      | Object List | Yes      | The new value for this variable.                                     |
| Scope      | Scope       | Yes      | Must match scope of declared variable with the same identifier.      |
| Object     | Object      | No       | Used to associate variable with an object when Object scope is used. |

## Outputs

| Output | Type | Description |
| ------ | ---- | ----------- |
| (none) |      |             |

\
\
**Contributors**

AddiCt3d 2CHa0s
