Hello!
I have a health component that has the variables MaxHP and CurrentHP and I just need to access them onBeginPlay of my game mode (C++). So far I’m getting a reference to the player and the health component properly (i have print nodes that show the name of the component when not a nullptr) however, it says that the variables I’m trying to assign to PlayerMaxHP (an int var inside the game mode) is inaccessible when I use: PlayerMaxHP = PlayerHealthComponent->MaxHP();
PlayerMaxHP - variable inside the game mode
PlayerHealthComponent - the health component reference
MaxHP - the variable inside the said component
Any advice will do thank you!