ChangeAnimation
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) |
||
Line 22: | Line 22: | ||
[[Category:Lua scripting]] | [[Category:Lua scripting]] | ||
+ | [[Category:Lua function]] | ||
+ | [[Category:Animation]] |
Revision as of 18:30, 4 February 2014
Play or Change an Animation
Note that it also apply to looped animations.
Basic use :
object = getObject("object") function onSceneUpdate() -- On "W" Key Press if isKeyPressed("W") then -- Play Walk Animtion changeAnimation(object, "1") end -- On "W" Key Release if onKeyUp("W") then -- Change to Pose changeAnimation(object, "0") end end