SelinaDev / Godot-Roguelike-Tutorial

Yet Another Roguelike Tutorial in Godot
MIT License
102 stars 11 forks source link

Tutorial Part 6 - Exporting enum AIType #27

Closed roydemirjian closed 3 months ago

roydemirjian commented 3 months ago

Following along the tutorial but hit a snag at part 6 Having issues with exporting enum Debating creating an AiComponentDefinition to see if I can get it to work that way, but would like to know if anyone else ran into issues here?

Snippet of entity_definition.gd

class_name EntityDefinition
extends Resource
.
.
.
@export_category("Components")
@export var fighter_definition: FighterComponentDefinition
# variable refers to an enum
@export var ai_type: Entity.AIType

Snippet of entity.gd

class_name Entity
extends Sprite2D
.
.
.
# two types of AI 
enum AIType {NONE, HOSTILE}

Getting the following error at entity_definition.gd: image

You can see that my entity_definition_orc.tres only has the one parameter for components image

If this should have gone in discussions instead let me know

roydemirjian commented 3 months ago

Issue was with Godot, not the code. Please ignore.