onready var state: State = get_node(initial_state) setget set_state
onready var _state_name: = state.name
The error happens on the second line.
Seems like a change due to Godot 3.2. You can leave the _state_name variable empty then. The set_state function will take care of initializing it:
var _state_name := ""
Thank you for the quick reply.
Tried that now I get "Attempt to call function 'enter' in base 'null instance' on a null instance."
func _ready() -> void:
Error happens on the third line.
Ah, it seems like you're not getting any state node. So the error is most likely either that you didn't set the initial state in your state machine, or you didn't set a correct path.
Ensure that initial_state is set in the inspector and it references an existing node of type State.
That was it, thanks!