Animated Tiles in Quest Editor

Started by jojo_f, February 21, 2018, 04:48:17 AM

Previous topic - Next topic
Hello! I am making some animated tiles in the Quest Editor. Is there a way to change the timing of animated tiles, the way there is to change for character animations?


It's not possible yet, but I think it is planned for Solarus v1.6. The same happens for the number of frames of animated tiles.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

The reason I am doing this, is to have environmental animations continue while the game pauses. Is there another way to do this? Is this a silly question?  ???

That is not a silly question, but a good one. You can use custom entities with sprites for that, but if you use a lot of them (several hundreds on the same map) it would not be optimal for the speed of the game. My custom tilesets have animated tiles that will need these new features for tiles, so we should have them for Solarus v1.6. In my opinion, some animated entities, which are too big and/or rarely used, are better as sprites (outside the tileset image), to keep tilesets simple.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

You can call sprite:set_ignore_suspend(true) to make sprites continue their animation when the game is suspended. It should not be a problem even with hundreds of them.
But I agree that more customization of animated tiles would be nice :)

February 22, 2018, 02:39:44 AM #5 Last Edit: February 22, 2018, 10:07:30 PM by jojo_f
Using sprite:set_ignore_suspend() and as a reference the Solarus Lua API--I am running into errors, because I am not sure how to use this method. My big problem is that all of the code I have made has been for events.

Currently I have a bonfire as an animated NPC, to prevent Link from pushing/pulling, and hurt him if he interacts it. So things like flowers are ok, but this bonfire is not. I guess I could place the NPC with no sprite, and then draw a sprite on top?

Thank you for your patience! I have been using Solarus a lot for about a month, and learning as much as I can, by watching every tutorial multiple times and reading everything on this forum!! I hope to have a decent demo game soon, but it is hard for my little brain to learn without seeing examples and following along.

you need to get the sprite of the entity first by using


Code (lua) Select
local sprite = entity:get_sprite()

Thanks! That works perfectly. I was trying a lot of ways to get this to work, getting as far as having no errors, but also having no function haha. This is very helpful.