so Im working on a roguelike and Im storing all the run info in a resource so I can store it in memory in case the player needs to step away. The problem is I don’t know whats the best way to access it. I can’t just autoload a resource so tried making a dummy script whose sole purpose is to store the resource but that doesn’t seem to have worked either. anyone more familiar with godot know what I should do?
You can autoload/global a script if it extends a Node, what is your script supposed to do? You have an error about property ‘playerHand’ but this script doesn’t contain that variable, nor a line trying to access it.
nevermind I think I figured it out. For those struggling with the same problem heres my game_state_holder script. which is a dummy script meant to hold my game_state.gd resource inside of a node/script that I can then autoload
extends Node
# this is fucked
var gs : GameStateManager
func _ready() -> void:
gs = GameStateManager.new()