Godot Version
4
Question
Here is my code, how can i fix what is going on? im very new to GDScript
extends TileMap
var ply : Node = get_parent()
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if (ply):
set_cell(0,ply.position,0,Vector2i(2,0),0)
print(ply.name)
print(ply.position)
else:
ply = get_parent()
ply = ply.get_child(0)
pass