Hello.
I will start off by saying i’m new to C++ especially in UE4 but I have been programming in various languages for a while. Anyways, going through the documentation I found that unreal has TMultiMaps which are ideal for me to use because I am trying to create a list of bonuses that can be applied to various things, but many different source types can be granted and only the largest of a particular type will be applied.
Anyways I am unsure how to use it because everything I try gives me some sort of error.
This is my BaseCharacter.h file.
#pragma once
#include "GameFramework/Character.h"
#include "BaseCharacter.generated.h"
USTRUCT()
struct FIntAsString
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, Category = Setup, AdvancedDisplay)
TMultiMap<FString, int32> MyMultyMap;
};
UCLASS()
class PATHFINDER_API ABaseCharacter : public ACharacter
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = BasicData)
FString Name;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = BasicData)
int32 HPCur;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = BasicData)
int32 HPMax;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Defense)
int32 AC;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Defense)
int32 ACTouch;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Defense)
int32 ACFlat;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Defense)
FIntAsString ACBonuses;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
int32 StrScore;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
int32 DexScore;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
int32 ConScore;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
int32 IntScore;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
int32 WisScore;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
int32 ChaScore;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
FIntAsString StrBonuses;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
FIntAsString DexBonuses;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
FIntAsString ConBonuses;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
FIntAsString IntBonuses;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
FIntAsString WisBonuses;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
FIntAsString ChaBonuses;