Hello, i Created a charactercomponent, everything worked fine, since i sorted the code that i have only one public area, im getting wrong values.
As you can see in the image, if i take the upperway everthing is fine, but shouldnt work like this, if i use the interface function i get for the level 1.120.403.456 .
The other values are fine like strength, stamina and so on.
Here is some Code.
component.h
UPROPERTY(BlueprintReadWrite, EditAnywhere, category = "General")
int Level;
UPROPERTY(BlueprintReadWrite, EditAnywhere, category = "Body")
int Strength;
characterinterface.h
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "InterfaceFunctions")
int GetCharacterLevel();
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "InterfaceFunctions")
int GetStrengthPoints();
character.h
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "CharacterInterfaceFunctions")
int GetCharacterLevel(); virtual int GetCharacterLevel_Implementation() override;
UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "CharacterInterfaceFunctions")
int GetStrengthPoints(); virtual int GetStrengthPoints_Implementation() override;
character.cpp
int APortalsCharacter::GetCharacterLevel_Implementation()
{
return this->CharacterAttributes->Level;
}
int APortalsCharacter::GetStrengthPoints_Implementation()
{
return this->CharacterAttributes->Strength;
}