I have a file called skill_move.gd
that contains the following:
extends Node
enum Skill {
Jump,
Backflip,
DoubleBackflip
TripleBackflip,
TooManyBackflips,
GoodLand,
GreatLand,
PerfectLand
}
This file is autoloaded via the AutoLoad tab in Project Settings, with the name Skillmove
and the Global Variable checkbox enabled.
In a scene that's loaded later in the execution of the game, I have this line of code:
func _process(_delta):
var backflip_enum = Skillmove.Skill.Backflip
which throws this error:
Invalid get index 'Skill' (on base: 'Node').
I have followed all the instructions for using player singletons here and code executed elsewhere that utilizes this enum appears to work fine; why is this happening?