PlayIdleAction - Actor

From the Fallout4 CreationKit Wiki
Revision as of 03:49, 25 October 2016 by imported>Qazaaq
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: Actor Script

Attempts to play an idle from the action root passed.

Syntax

bool Function PlayIdleAction(Action aAction, ObjectReference aTarget = None) native

Parameters

  • aAction: The Action form the actor is attempting to play an idle from.
  • aTarget: Optional parameter noting the target of the actor's action.
    • Default: None

Return Value

True if an idle was successfully loaded and played, false otherwise.

Examples

; Make Dogmeat Bark
 if DogmeatRef.PlayIdleAction(barkAction)
   Debug.Trace("Dogmeat barked!")
 else
   Debug.Trace("Something went wrong")
 endIf

Notes

Too many things can happen while you are attempting to play an idle, so make sure to gracefully handle all circumstances. Never use the structure "play idle, wait for event" - this will inevitably cause your script to get stuck forever when some other code or script overrules your idle.

See Also