Difference between revisions of "LUA:PlayAnimation"

(Created page with "Allows you play an animation through a spawn. == Syntax == PlayAnimation([Spawn] spawn, [int32] visual_state) == Example == <pre> function hailed(NPC, Spawn) PlayAnimation...")
 
(Syntax)
Line 2: Line 2:
  
 
== Syntax ==
 
== Syntax ==
PlayAnimation([Spawn] spawn, [int32] visual_state)
+
PlayAnimation([Spawn] spawn, [int32] visual_state, ([Spawn*] state), ([int8] type]))
  
 
== Example ==
 
== Example ==

Revision as of 11:11, 7 September 2013

Allows you play an animation through a spawn.

Syntax

PlayAnimation([Spawn] spawn, [int32] visual_state, ([Spawn*] state), ([int8] type]))

Example

function hailed(NPC, Spawn)
    PlayAnimation(NPC, 121)
end

When an NPC with this function is hailed, that NPC will use the visual state with the ID of 121 which is the bow animation.


Back to LUA Spawn Functions Index