"playback_rate" for sprites doesn't work

How exactly are you writing the code?

Does seem like some weird things are going on

SpritePlaybackRate.zip (3.7 KB)

	print(go.get("/a#sprite", "playback_rate"))
	sprite.play_flipbook("/a#sprite", "a", nil, {playback_rate = 30})
	go.set("/a#sprite", "playback_rate", 60)
	print(go.get("/a#sprite", "playback_rate"))

If you do the above the rate will print as 1 and then 60 in the example I posted, but the actual rate will be 30. It looks like if you set a rate with sprite.play_flipbook properties and then do go.set to set the rate on the same frame the go.set value is ignored by the actual playback but isn’t by the print.

It’s actually that if you do sprite.play_flipbook you have to supply the playback_rate in its properties table because you cannot set it anywhere else on the same frame. On the next frame it works.

3 Likes