ChangeAnimation
(Difference between revisions)
(Created page with "Play or Change an Animation Note that it also apply to looped animations. Basic use : object = getObject("object") function onSceneUpdate() -- On "W" Key...") |
|||
Line 12: | Line 12: | ||
if isKeyPressed("W") then | if isKeyPressed("W") then | ||
-- Play Walk Animtion | -- Play Walk Animtion | ||
− | changeAnimation( | + | changeAnimation(object, "1") |
end | end | ||
-- On "W" Key Release | -- On "W" Key Release | ||
if onKeyUp("W") then | if onKeyUp("W") then | ||
-- Change to Pose | -- Change to Pose | ||
− | changeAnimation( | + | changeAnimation(object, "0") |
end | end | ||
end | end |
Revision as of 23:00, 20 December 2012
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