0 votes

I'm trying to make a 2D procedural terrain generator in Godot 3.2 and I would like for the generator to be able to select various shades of a color to represent grass, stone, dirt, etc.
I have a palette with said colors, and I created an atlas for each tile type, however I can't find a way to make the script place a specific subtile from a specific atlas. Help?

in Engine by (24 points)

1 Answer

+1 vote
Best answer

set_cell takes a Vector2 autotile_coord that determines which sub tile to use
https://docs.godotengine.org/en/3.2/classes/class_tilemap.html#class-tilemap-method-set-cell

by (1,659 points)
selected by
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.