Properties

Read and write State Machine variables from anywhere

Properties allow you to read and write State Machine variables from anywhere in Game Creator 2's visual scripting system.

Get Properties

Read values from State Machine or Runner variables. Available in any Game Creator 2 property field.

Type
Asset
Runner
Description

Animation Clip

โœ“

โœ“

Get an animation clip reference

Audio Clip

โœ“

โœ“

Get an audio clip reference

Bool

โœ“

โœ“

Get a boolean (true/false) value

Color

โœ“

โœ“

Get a color value (RGBA)

Decimal

โœ“

โœ“

Get a decimal number value

Direction

โœ“

โœ“

Get a direction vector

GameObject

โœ“

โœ“

Get a GameObject reference

Material

โœ“

โœ“

Get a material reference

Position

โœ“

โœ“

Get a world position (Vector3)

Rotation

โœ“

โœ“

Get a rotation value (Quaternion/Euler)

Scale

โœ“

โœ“

Get a scale vector

Sprite

โœ“

โœ“

Get a sprite reference

String

โœ“

โœ“

Get a text string value

Texture

โœ“

โœ“

Get a texture reference

Set Properties

Write values to State Machine or Runner variables. Available in Game Creator 2 Set property actions.

Type
Asset
Runner
Description

Animation Clip

โœ“

โœ“

Set an animation clip reference

Bool

โœ“

โœ“

Set a boolean (true/false) value

Color

โœ“

โœ“

Set a color value (RGBA)

Float

โœ“

โœ“

Set a floating-point number

GameObject

โœ“

โœ“

Set a GameObject reference

Material

โœ“

โœ“

Set a material reference

Sprite

โœ“

โœ“

Set a sprite reference

String

โœ“

โœ“

Set a text string value

Texture

โœ“

โœ“

Set a texture reference

Vector3

โœ“

โœ“

Set a 3D vector (position/direction/scale)

How to Use Properties

  1. In any Game Creator 2 action that accepts a property value, click the property dropdown

  2. Navigate to Variables โ†’ State Machine or Variables โ†’ State Machine Runner

  3. Select the variable you want to read or write

  4. For Runner properties, also specify the target GameObject

Usage Examples

Reading a Variable

Writing a Variable

Asset vs Runner Properties

Use Case
Use Asset
Use Runner

Shared state across all instances

โœ“

Per-instance behavior (each enemy has own state)

โœ“

Global game state (game mode, settings)

โœ“

Individual character state (health, ammo)

โœ“

Prefab-based objects

โœ“

Singleton managers

โœ“

Best Practice: Use Runner properties for most gameplay scenarios. Use Asset properties only for truly global state that should be shared across all instances.

Special Properties

GameObject List

In addition to single GameObject properties, State Machine 2 supports GameObject List properties for working with collections of objects.

Property
Description

Get GameObject List

Read a list of GameObjects from a State Machine variable

Set GameObject List

Write a list of GameObjects to a State Machine variable

State Machine Instance

Get a reference to the State Machine Runner's instance GameObject:

Property
Description

Get Instance

Returns the GameObject that the State Machine Runner is attached to

Last updated

Was this helpful?