Difference between revisions of "PlayIdleWithTarget - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>Terra Nova2
(Added note.)
Line 26: Line 26:
endIf
endIf
</source>
</source>
== Notes ==
* This function will send the actor initiating the idle into combat alert state. None of the combat based functions that will remove this state works. The NPC is stuck in combat alert.
One solution is to have another actor use [[ForceGreet (Procedure)]] but it doesn't fix the actor holding an invisible weapon, but this all clears when you exit the location. [http://forums.bethsoft.com/topic/1447688-issue-with-playidlewithtarget-and-killer-staying-in-combat-alert/?hl=%2Balert#entry22342004 source] The OP of that thread and myself seem to be the only ones to encounter this. Needs more testing.


== See Also ==
== See Also ==

Revision as of 12:36, 24 January 2014

Member of: Actor Script

Plays the idle passed and overrides the actor's target with the given target. If no target is passed, then the idle will use the actor's current target instead.

Syntax

bool Function PlayIdleWithTarget(Idle akIdle, ObjectReference akTarget) native

Parameters

  • akIdle: The idle to play on this actor.
  • akTarget: The target the actor should play the idle with - usually used for paired animations.

Return Value

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

Examples

; Start Hadvar's backstab paired idle against the thief
if Hadvar.PlayIdleWithTarget(Backstab, Thief)
  Debug.Trace("Hadvar just backstabbed the thief!")
else
  Debug.Trace("Something went wrong")
endIf

Notes

  • This function will send the actor initiating the idle into combat alert state. None of the combat based functions that will remove this state works. The NPC is stuck in combat alert.

One solution is to have another actor use ForceGreet (Procedure) but it doesn't fix the actor holding an invisible weapon, but this all clears when you exit the location. source The OP of that thread and myself seem to be the only ones to encounter this. Needs more testing.

See Also