Player health problem in the Unity RPG course

Hi all, just wondering if anyone got this problem in the ‘’ Unity RPG Core Combat Creator: Learn Intermediate C# Coding ‘’, Character Stats section. The player health goes down after killing any enemy from a distance, meaning no enemies got to attack the player.
Any help is appreciated thank you!

It’s actually an illusion caused by not resetting the player health to the new max health. The Percentage went down, but the actual health remains the same…
For example:

  • Level 1: currentHealth = 100/MaxHealth = 100, percentage = 100%
  • Level 2: currentHealth = 100/MaxHealth = 125, percentage = 80%

Oh ok,I got ya! Thanks.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms