I have a script and it looks like this
extends TileMap
var BreakPalmPosition
var BreakPalm
func _process(delta):
if BreakPalmPosition != null:
BreakPalm = world_to_map(BreakPalmPosition)
set_cellv(BreakPalm, 0)
BreakPalmPosition = null
And i saved the tilemap as a scene and activated singleton. That way i can change the BreakPalmPosition
variable to the position of the palm im breaking. That looks like this
Saplings.BreakPalmPosition = position
And Then its changed back to null
again after its used for some reason when i do set_cellv
and then the position as the new variable linked to the tilemap via world_to_map
it dosent set the cell. Probalby its a very obvious problem and im just stoopid but if anyone knows why it dosent please let me know