ReferenceActors

getactorstates

Returns proxies for currently observed Actor states.

Syntax

getactorstates() -> {LuaStateProxy}

Also available as

get_actor_states

Returns

TypeDescription
{LuaStateProxy}Available Actor-state proxies.

Description

Several Actors can be associated with a state, so do not infer an exact one-to-one relation from the two arrays returned by getactors and getactorstates. Each proxy can list its associated Actors through state:GetActors. Results are snapshots and can become stale.

Example

for _, state in getactorstates() do
    print(state.Id, #state:GetActors())
end

These are Game executor contracts. Check build requirements and session lifetimes before using them.