Skip to content

RandomState

Realm: SERVER (supported usage).

actor:RandomState()

Chooses and applies a weighted at_random state unless PreRandomState cancels; returns the resulting state name.

Source: lua/background_npcs_core/actor/components/sh_state.lua.

Realm reference.