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

0 Members and 1 Guest are viewing this topic.

llamazing

  • Full Member
  • ***
  • Posts: 221
    • 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: 1195
    • 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: 1195
    • 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: 221
    • 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.