Simple State Component

The Simple State component provides a simple state machine. Each state is represented by a name and an array of zero or more entities. The entities are activated upon entering the state and deactivated upon exiting it. A simple state component may be in NullState, which means no state is active.

Provider

O3DE Core (LmbrCentral) Gem

Simple State properties

Simple State component properties

PropertyDescriptionValuesDefault
Initial stateThe active state when the Simple State component is first activated.<None> or state Name<None>
Reset on activateIf enabled, Simple State component returns to the Initial state when activated, and not the state held before deactivating.BooleanEnabled
StatesAn array of states.
States - NameDefines the name of the state.StringNew State
States - EntitiesAn array of entities that are associated with a state.EntityIdNone

SimpleStateComponentRequestBus

Request NameDescriptionParameterReturnScriptable
GetCurrentStateReturns the Name of the current state.NoneState: StringYes
GetNumStatesReturns the total number of states.NoneCount: IntegerYes
SetStateSets the component to a specific state by Name.State: StringNoneYes
SetStateByIndexSets the component to a specific state by its index in the States array.State Index: IntegerNoneYes
SetToFirstStateSets the component to State[0], the first state in the States array.NoneNoneYes
SetToLastStateSets the component to the last state in the States array.NoneNoneYes
SetToNextStateSets the component to the next state in the States array.NoneNoneYes
SetToPreviousStateSets the component to the previous state in the States array.NoneNoneYes

SimpleStateComponentNotificationBus

Notification NameDescriptionParameterReturnScriptable
OnStateChangedNotifies listeners that the state has changed.NoneOld State: String, New State: StringYes

For more information, see Working with the Event Bus (EBus) system.


Copyright © 2026 DawnEngine. All rights reserved.

DawnEngine is a commercial 3D engine distributed under the DawnEngine end-user license agreement. Engine binaries and source are proprietary and are not covered by the licenses below.

Documentation only: the prose and templates on this site are a derivative work of Open 3D Engine (O3DE) documentation by the O3DE Contributors, used under CC BY 4.0 (documentation content), Apache 2.0 (site code), and the MIT license (inline code samples).

The open-source 3D engine that DawnEngine is built on top of is Open 3D Engine . DawnEngine is not affiliated with, endorsed by, or sponsored by The Linux Foundation or the O3DE project. “O3DE” and “Open 3D Engine” are trademarks of The Linux Foundation.