Hello everyone,
I assume others may be curious about how to do this as well. I am trying to create a health bar that upon an item pickup it increases the players overall health bar. For example the player starts with 50/50 health on health bar. Picks up an item that increases health bar size. Health bar size increased to 50/60. Now they can pickup 10 more health. Example of a game that does this is Bioshock. Any help on how to do this would be appreciated.
Here is a tutorial I made that will show you how to create a dynamic health bar. I did not mention in the video but be sure to actually change the player health variable that is linked to the progress bar percent for this increased health bar size to actually represent added player health. So if player health was 100 and max health was 100, the bar is full for any size. Once you increase the size of the health bar be sure to change “max health” to something like 125 so that the progress bar will now be at 100% when player health is 125 instead of 100.