Hi,
I have 3 nodes:
A (Node2D)
->B (Node2D)
->C (Area2D)
C has this script:
extends Area2D
var parent
var parentsparent
A has this:
func _ready():
get_node("B/C").parent = get_node("B")
get_node("B/C").parentparent = self
this gives the "Invalid set index 'parent' (on base: 'Area2D') with value of type 'Node2D (test_b.gd)'.
From my understanding this should work? C gets loaded before B and that before A, so when A's _ready() runs it should be able to access C's variables?
The purpose of that btw is to test if saving the reference is (noteworthy) faster then using get_parent()