local spr = Animations["example"]:getSprites(VAnimationSprites)
for i = 1, #spr do
print(spr[1])
end
function createAnimationObject(_scene, _name)
return scene:create(VSceneObjects, _name)
end
function createAnimation(_aniObj, _name, _path)
local ani = _aniObj:create(VObjectAnimations, name)
ani:setValue(VAnimationSprites, { {path = _path} })
startAnimation(ani)
return getObject("ActiveAnimations[".._name.."]")
end
myAniObj = createAnimationObject(game.CurrentScene, "back")
myAnimation = createAnimation(myAniObj, "tunnel", "Kulissen/UBahn/Tunnel0.jpg")
Can't find object "tunnel" in table "ActiveAnimations"
ani:setValue(VAnimationNumberOfLoops, 0)