Good afternoon, sorry for the stupid question, but does the play_flipbook() function work with tilesource animation?
When I use in play_flipbook("#sprite", “[atlas animation]”) it works fine but refuses to find the path no matter if I put in animation name or 100% path
Note: destruct is the name of the animation in the tilesource
function on_message(self, message_id, message, sender)
if message_id == hash("trigger_response") and message.enter then
sprite.play_flipbook("#sprite", "destruction", function()
go.delete()
end)
end
end
But you got it working now or? If not, please double check that you have indeed assigned the correct tilesource to the sprite. From the error message it looks like there is no such animation.
Honestly, I have a feeling that the project itself is completely broken. The player’s sprite went crazy, even though I didn’t even touch it and started shrinking…
Thank you very much. By the way, can you also see what is the problem with the enemy animation script? It’s just that I can’t figure out what the problem is and why when using tileset “test” the animation works.
Now your script works for me and the enemy ship is destroyed without an error.
EDIT:
actually, sorry, you can’t see the enemy spaceship, just the explosion - you need to set the start tile of the animation to one (you have it at 4 atm)