generating something like materials/resources (tiles/area2ds) in a 2d plane

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lettucing

so, i have a tile (area2d w sprite) and a 2d plane, and i also have a placement system that uses tiles
i have it set so that all the tiles snap to a grid

i want to generate a tile across the 2d plane as if it was a small pocket of materials as you move through the map without overwriting already placed tiles

how can i do this

Could You explain more ? Or some picture ?
Can’t You use another tilemap for this ?

Inces | 2022-07-25 13:57

I second just using other TIlemap or whatever node you have been using

Pomelo | 2022-07-25 17:39

sorry for the confusing question

im just using area2ds and snapping them to a grid for certain reasons
i have an area2d which acts like if it was a resource the player can find after moving
i want that area2d to spawn across the map

lettucing | 2022-07-25 18:02

:bust_in_silhouette: Reply From: Inces

Whenever You are planning something within a square grid, Tilemap node will be a good sollution.

It looks like You want to display some kind of attack range of your object on a grid. Use a Tilemap with a cell_size of your grid size. You can arbitrary set the shape by creating specific tiles layout in the editor, or You can build tilemap dynamically in chosen shape by code.

You say You don’t want to overwrite the map. But what is this map ? Is it just a visualized grid ? You can design tiles of a tilemap to be partially transparent, or to be color-outlined squares, so it will overlay your map, but not overwrite it.

Did I understand it correctly ?