0 votes

I am creating a map that is going to use auto-tile tilemapping. I have 6 different types of terrain (counting) and I'd like interactions with all of them.

For now, I have 6 tilesets for terrain types, using a 3x3 (minimal) bitmask. They represent "water", "grass on water", "mountain on water", "sand on water", "snow on water" and "forest on water".

If I want to use those to create "mountain on grass", "snow on mountain", etc.

Is there an easy way to do that or should I create a painful 21 different tilemaps? (again, if I add but one terrain, I'm good to add 7 more tilemaps).

Godot version v3.2.3.stable.fedora
in Engine by (25 points)

1 Answer

+1 vote
Best answer

You can check what kind of tile a tile is with its ID. You'll need to use the world_to_map and get_cell functions of TileMap. If you want to check which autotile it is specifically, you can use get_cell_autotile_coord. You can hold "alt" in the TileSet editor to see a tile's ID.

by (7,190 points)
selected by

Thanks! I accept your answer as it may help others, but I ended up having multiple layers of tilemaps, which worked for me. It's nice to know that you can do the thing you propose, though!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.