system
August 24, 2022, 9:56am
1
Attention
Topic was automatically imported from the old Question2Answer platform.
Asked By
Qri_dev
The TileMap has Grass Tiles on every 50x50 corner of the map.
yet when the function of get_tiles() argument is inserted with the tile position from the world to map position of global mouse position from get_global_mouse_position().
the function always return -1 (Invalid_tiles).
can you guys give me any solution? did I do some mistakes? I will appreciate it greatly.
I called the get_cell function on _process(delta) rather than a made function.
and it returns 0, this proves that the problem is in the function.
something prevents the get_cell function from working properly on a programmer-made function.
Qri_dev | 2022-08-24 10:32
system
August 24, 2022, 10:40am
2
Reply From:
Qri_dev
The Answer has been answered on Godot Discord by Parapixel
The if not set_cell == 0:
caused the tile to be removed which cause that.