0 votes

So I am trying to make a game where there are different biomes you can explore. I want to store which biome I am currently in by storing it in a variable, I thought I could do this by detecting what tile I am standing on (since each biome has its own tiles), it's important to note that I am using auto tiling not normal single tiling do I don't think IDS work. If you have a better Idea on detecting what biome I'm in, please share.

Ps. This is a 2d topdown pixel art game

Thank You. :)

Godot version 3.2
in Engine by (12 points)

2 Answers

+1 vote

TileMap.get_cellv() will get the id of the tile you're standing on, but as you said the id doesn't help when you're using autotile - the id will always be the same.

That's why TileMap.get_cell_autotile_coord() exists.

Returns the coordinate (subtile column and row) of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling.

Using this, you can figure out which autotile cell you're on.

by (21,712 points)

This would work but unfortunately, I'm doing a procedurally generated world so doing this would always give me a random value

0 votes

From Rungeon (YouTube):

"When u procedurally generate a level with tilemap, u use TileID to place the tiles, I've done this recently. And I also have it so if you click on a block you manipulate it (based on that tileID)"

by (597 points)
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 Frequently asked questions and 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 [email protected] with your username.