Hey all, working on a crafting system. Got thr items part working fine, making an ITEM resource that works really well. Now I need to make recipes for crafting. For some reason though, I can't seem to make arrays of ITEM in my recipe.

`extends Resource
class_name RECIPE

@export var required_items = [ITEM]`

But when I create a recipe and try to add some ITEM to the required_items area, it won't allow it. So how do I properly create an array for this?

  • xyz replied to this.

    CorvaNocta
    A typed array that holds only elements of specific type should be declared like this:

    @export var required_items: Array[ITEM]

      xyz oh I was so close! Thanks for the tip! It does indeed work now!