Active State

Description

The Active State behavior will trigger an event once immediately when your object enters an active or idle state. An active state implies an object is moving, rolling, or colliding whereas an idle state implies that an object has stopped moving and is at rest. 

 

Properties

Triggers Once on Event

Object A

This is the object you want to check when it becomes active or idle. By default the current object is selected, but you can tap the graphic and choose any other object in your scene.

Event Types
  • Became Active - Triggers an event when an object's state has changed to active. An active state is when it is moving, rolling or colliding.
  • Became Idle - Triggers an event when an object's state has changed to inactive. An inactive state state is when the object is idle and no longer moving.

 

Outputs

Object ID

This outputs the Object ID.

 

Examples

1. You can use this for an AI state. By checking the inactive state of your player, the AI can stop or no longer patrol. When the object is inactive, disable behaviors, or run other necessary logic.

2. In a physics based scene, you can make sure one objects behaviors will only execute if another object is active. You can download the example project here.

 

Related

Moving State

Falling State

 

BecameActiveReference.gif

0 Comments

Article is closed for comments.