So I’ve set up a basic health initialization code:
public: UPROPERTY(Category = Gameplay, EditAnywhere, BlueprintReadWrite) int MaxHealth; int Health;
in the constructor I check if a default value has been set, if not, default to 1.
//Start with max health if (MaxHealth == 0) MaxHealth = 1; Health = MaxHealth;
In the BP, I have set MaxHealth variable of the player to 3.
Yet when I start the game, it’s still at 1. If I set it to 3 in C++, it starts at 3.
The ints used to be int16 but are now just normal ints, and I’ve had problems before with existing blueprints not updating with certain c++ changes and having to be entirely recreated and hoping that this is not the case. (Edit: I’ve tested this, new blueprints are also stuck with 1 HP)