Hi friends
I have dice flipbook animation with 6 images on it, I play it uing this line of code:
sprite.play_flipbook("/dice#sprite", "dice")
After playing this animation i want to know current image on playing animation ( ie when i press keyboard button ).
how can i get current image of animation group which is playing?
how can i set one of those images of animation as current image? ( for example i want to set it to 3rd image )
Thanks
thanks selimanac , yes I think cursor wokrs, it needs simple calculation to find frame number from float number.
i have tested this line of code to set playback_rate:
go.set("/dice#sprite", "playback_rate", 0)
but this one is not working to set offset
go.set("/dice#sprite", "offset", 2)
‘/dice#sprite’ does not have any property called ‘offset’
offset is the property of sprite.play_flipbook() sprite.play_flipbook(url,id,[complete_function],[play_properties])
I’m not on the computer now, I’m not able to test it but something like this:
local play_properties = {
offset = 0.5 -- normalized initial value of the animation cursor
playback_rate = 0
}
sprite.play_flipbook(url,id,[complete_function],play_properties)