New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Tileset.loadFromTilemap/TileMap.toImage function for scripts. #3519
Comments
You mean you don't have your map saved as a file, so that you could do the following? tileset.image = "mapfile.tmx"I think for the need to load a map generated in script directly as a tileset, it would indeed be nice to have a
Hmm, yes there could definitely be added a |
|
If setting the |
|
Changing the |
|
Yes, it works, however there does not seem to be any way to set a transparent color for a |
It appears to have been left undocumented, but there is |
|
Great, thanks! |
Also fixed the type of ImageLayer.transparentColor and added some notes to Tileset properties that should ideally be set up before the image is set. See issue #3519.
Currently, Tiled can create "metatilesets" that are based on other tilemaps, but only if you create it as a .tsx file. There is no mechanism for loading a TileMap object directly into a Tileset, nor is there a way to generate an Image from a TileMap, which could be another method of implementing this function. There is also no way to retrieve an Image for a given Tile, so if I wanted to do something like this in scripting, I would have to process the original tileset's image, cut it into tiles and place them in a larger image manually.
The text was updated successfully, but these errors were encountered: