How does this work? I tried setting cursor property values but nothing changes.
playback_rate does seem to work fine.
function init(self)
local num = math.random(30)
print(num)
go.set("#sprite", "playback_rate",math.random(num))
end
Got it working
function init(self)
local num = math.random(30) / 30
print(num)
sprite.play_flipbook("#sprite", "spin", nil, {offset = num})
end
Has to be a value between 0-1? And has to be used on play_flipbook also it’s called offset not cursor. playback_rate can be set here too.
This is awesome! Really useful for spawning things on the same frame and giving them some random variation in animations.