SetActorState

From Eternity Wiki
Jump to navigationJump to search

Description[edit]

This is an ACS built-in function.

Change the current frame of tagged things.

Usage[edit]

int SetActorState(int tid, str state, int exact)

Parameters[edit]

  • tid: TID of affected things
  • state: name of state. Allows Decorate-style state names. See notes.
  • exact: if 0, it allows truncation if composed of multiple dot-separated words. If 1, it must match.

Return value[edit]

The number of actors whose states changed

Examples[edit]

No examples given.

Notes[edit]

The state name doesn't need to be a frame name. It can also be a Decorate style state label. Even more, it can also refer to the label of another thingtype. For example, you can change the state to be Zombieman::Death, which will send all tagged things into the death frame of the Doom zombieman (if defined), even if themselves are not zombiemen. Omitting the name, e.g. Pain, will send all tagged actors into their specific pain states, if available. It will not remove things if the state is unavailable and S_NULL.

The exact value, if 0, allows such states as Pain.Fire.Extreme (or whatever names) to also fallback to Pain.Fire or Pain, if the longer labels are unavailable. This is useful when tagging multiple actors with customized states.

This function's identification in zspecial.acs is: ACS internal.

See also[edit]