The Title says it all, I’m trying to figure out how to add 10 HP for each level up on the player character. The only complication I’m running into is if the player levels up more than once, I have no idea how to account for that. I’m still pretty new to UE4. Any advice/Help would be nice.
Put this in the character and call it every time you level up:
Essentially, Get current value of maxHP → add 10 → Set maxHP to the new value.
Next time you call it, you’ll be adding 10 to the already increased value.
Simply make a custom event onLevelUp , get maxHealth , add ten and set maxHealth.
You can add all the logics you want to this event, like increment maxStrenght, restore health, play animation, open a widget showing new stats and so on.
You can also make an event dispatcher for communicate you leveled up to others blueprints, like level BP and spawn an item as a reward near you for example!