You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:PlayAnimation"
(→Syntax) |
|||
| Line 1: | Line 1: | ||
| − | Allows you play an animation through a spawn. | + | Allows you play an animation through a spawn. The third and fourth parameters are optional. The third parameter must be a player if used. The third parameter is to be a player that you either wish to be the only client to send an animation to, or to exclude that client. Using 1 for the type param send the animation to param 3, using 2 sends the animation to all others in range. |
== Syntax == | == Syntax == | ||
Revision as of 11:13, 7 September 2013
Allows you play an animation through a spawn. The third and fourth parameters are optional. The third parameter must be a player if used. The third parameter is to be a player that you either wish to be the only client to send an animation to, or to exclude that client. Using 1 for the type param send the animation to param 3, using 2 sends the animation to all others in range.
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.