I modified Tiled to generate .collection files, to allow usage of multiple tilesources per tilemap in Defold (here’s the pull request in case anyone needs it, too).
I’m now trying to allow usage of animated tiles.
My plan was to generate a .lua file to go along with a .collection file. In that .lua file, I’d keep information about which tiles need to be animated in what way.
Inside the collection, I have a custom “TileAnimator” component. This component is supposed to do the animating, but it can’t read the associated .lua file, because script properties don’t allow strings, which is what you need to save the path to the file. (which @Ragnar_Svensson said was intentional)
And I don’t see how I can get the path to the correct .lua file through code, either (I spawn them through collectionfactory, and the collection’s path isn’t exposed as property either!), without creating some shared table which I’d have to fill in manually for every collection I intent do use. I want each tilemap (.collection) to be self sufficient once Tiled spits it out.
Is it possible in Defold?