So I need to check against a variable from in another script. Seems quite simple, just use get_node and call the variable where needed right? It's not working like that this time and I have no idea why.
Spawn Area script:
onready var spawnTrigger = get_node("/root/MainScene/SpawnTrigger").trigger
if(spawnTrigger == 1):
Spawn Trigger script:
var trigger = 0
if body.name == "Player":
trigger = 1
So, something like this hasnt been an issue before but for some reason it is now and it's throwing up "Invalid get index 'trigger' (on base: 'Node2D')"