Author Topic: Getting the sprite of a Dynmaic Tile  (Read 1253 times)

llamazing

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Getting the sprite of a Dynmaic Tile
« 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.

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
Re: Getting the sprite of a Dynmaic Tile
« Reply #1 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

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
Re: Getting the sprite of a Dynmaic Tile
« Reply #2 on: September 25, 2016, 08:45:07 pm »
Their frame delay is hard-coded to 250 ms.

llamazing

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: Getting the sprite of a Dynmaic Tile
« Reply #3 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.