Godot Version
v4.5.1.stable.official [f62fdbde1]
Question
Hi all,
I have a question on how to best handle the following issue:
I have custom resources, like wood and stone. I set up the necessary info in the editor. Example:
class_name Materials extends Resource
@export var material_type: String
@export var material_img: Texture2D
I also have different kinds of housing. The base resource looks like this:
class_name House extends Resource
@export var build_cost: Array[Materials]
@export var build_material_amount: int
Now, I want to add different building costs to place the housing. For example, house1 uses 5 wood and 5 stone to build, house2 uses 10 wood and 10 stone.
With the setup above, I’m not able to define the specific amount for each material resource. If I add some variable to the material resource about the cost, it’ll be the same amount for all houses. I also couldn’t get some exported Dictionary with the Array to work.
Do you have any suggestions?
Thank you very much in advance!
