SuperGibaLogan did you static cast the exports back?
@export var scatter_targets : Array[Node2D]
or are you trying to access the values of a node from another node?
again, what are you TRYING TO DO?
SuperGibaLogan btw im using the code so i can make the variables for the enemy character im making
so your variables are scatter_targets
and at_home_targets
what does this mean?
I can only deduce that you want to assign the individual nodes that the "enemy" is going to interact with.
this is a bad way of doing it. use groups instead.
put your nodes into a group (the nodes and groups tab next to inspector), then in your enemy code you can get an array of nodes in that group with:
var scatter_targets = get_tree().get_nodes_in_group("scatter_targets1")#lets say the nodes are in a group called scatter_targets1
you can get_nodes_in_group
whenever you need to do something with them, this method won't create a problem with deleted objects leaving behind an empty reference.
there are other situations that would lead to other ways of doing things, why exactly do you need them in these 2 exports?