hello everybody
I want to make a game with hexagon tiles. There are 3 terrain types, sea, plain, mountain, and each have their movement costs.
So I created an enum
UENUM(BlueprintType) enum ETerrain{sea,plain,mountain);
and a structure
USTRUCT(BlueprintType)
struct FHexStruct {
GENERATED_BODY()
// other stuff
UPROPERTY(BlueprintReadWrite)
ETerrain Terrain;
}
What is the best way to store the movement cost of each type (ex sea=3, plain =1, mountain=5) in this setup ?
I tried to add the MvtCost to the struct and create a setter function - but structure functions can’t be accessed via BP
I can create a Map (terrain, cost) but that looks cumbersome…
I believe this is a common situation… any idea will be greatly appreciated !
best
Jerome