@Magso
I was trying to path to the scene because I didn't realize that you could move up and down the scene tree.
I tried to use the get_parent() method and I'm getting: "Invalid get Index 'animalSpawned' (on base: 'Node2D')" and game freeze when the animal is spawned via the player entering a collision shape.
func _ready():
if get_parent().animalSpawned: #also tried self.get_parent()
print("This is true");
else:
print("Something is wrong");
The scene tree should look like this after game load:
spawnHolder
-spawnPoint #this holds the animalSpawned var
- -animal #this holds the _ready() function.
-spawnPoint
- -animal
etc.
Not sure why this isn't working as it seems like it should be easy.