Godot Version
4.3
Question
So what I wanna do is effectively something like this where a resource contains an array full of instances of a pretty basic data set
#script A
class_name Data extends RefCounted
#I need this to be a flags so I can have multiple of them selected at a time
@export_flags("Combat", "Puzzle", "Exploration") var challengeType = 0
@export_enum("Total", "Less_Than", "Greater_Than", "Equals") var comparisonType : int
@export var value : int
var valueModifier : int = 0
# script B
class_name Enemy extends Resource
@export_var array : Array[Data]
However this itself doesn’t work since an export can only be a built-in, a resource, a Node, or an Enum. I don’t think I want Data
to be a resource cause that’s just gonna bloat the number of different files I have going on. I looked around a bit and a Dictionary might work but if it does then I don’t know how I would set it up if that makes sense.
If anyone has any ideas, either for the dictionary or some other method, on how to get this to work then that’d be greatly appreciated