Solarus Forum

Solarus => Development => Topic started by: llamazing on September 25, 2016, 08:31:09 pm

Title: Getting the sprite of a Dynmaic Tile
Post by: llamazing on September 25, 2016, 08:31:09 pm
I have a tile that I converted to a dynamic tile (pattern torch_big.top from the ALTTP resource pack), but when I call get_sprite() for the dynamic tile from in the map:on_draw() function, it returns nil. What am I doing wrong?

What I want to do is read the frame number so that I can synchronize an overlay with the animation.
Title: Re: Getting the sprite of a Dynmaic Tile
Post by: Christopho on September 25, 2016, 08:43:04 pm
Dynamic tiles don't use sprites, they have their own displaying system in the engine. Maybe this is a mistake :p
Title: Re: Getting the sprite of a Dynmaic Tile
Post by: Christopho on September 25, 2016, 08:45:07 pm
Their frame delay is hard-coded to 250 ms.
Title: Re: Getting the sprite of a Dynmaic Tile
Post by: llamazing on September 25, 2016, 10:27:54 pm
Dynamic tiles don't use sprites, they have their own displaying system in the engine. Maybe this is a mistake :p
Okay, thanks for the info. I made the flickering effect a little more subtle so if my timer gets out-of-sync with the internal timer then hopefully it won't be as noticeable.