There used to be a couple MFAs that had some examples on how to use the TileMap extension, but I can't seem to find them. Luckily, I had combined them all into a single MFA at some point, and here's that MFA: (attached below) It should have examples on how to do animations.
Now here's an issue that I'm having, and I can't find a solution. So its possible to load tilesets from a File into the TileMap object. Then, when you save the TileMap into a .map file, the path to the tilesets is also saved into the .map file. My only problem is that I can not figure out how to re-load the tilesets from the .map file. When I load the .map file in Fusion, and use an expression to get the count of tilesets, it always reports 0, as if the tilesets are not loaded.
If I open the map in a hex editor, I can see that the paths to the tilesets are stored in a "TILE" block in the binary.
EDIT: I can not get an image to work on the forum for some reason, here's a link: https://i.imgur.com/PifljWI.png
The "TILE" block is highlighted in red here. My solution to get around not being able to load the tilesets is to use the "Map Properties" instead, and just manually save the filenames to properties called "T0" and "T1" etc for each tileset. Then upon loading the map, I run a fastloop to check for these properties, and add a new tileset for each one. Only then will external tilesets work. This is obnoxious though, because its doubling the same data in the file.
There has got to be some way to actually read the data in the "TILE" block to get tileset paths, otherwise why would we even have the option to save that data in the first place? In the example files, I couldn't find anything about how to save/load external tileset files this way. The examples only had loading external maps with predefined tilesets in the Fusion editor.
Also, is there any documentation on how this TileMap file format works? I can see that its binary, and I know how to use a hex editor only a little bit. But beyond that, Its a bit of a mystery to me how to get information out of it.