Health Bar & XP Bar[Solved]

Hello Everyone,

My game has a health bar and an xp bar. I want to keep the health bar at a width of 150 but my health is 100. How would i make it so if the enemy shoots me it takes 10 away from my health leaving me with 90 health left. rather than making the health bar 100px wide and taking 10 away from that. because i want to be able to have health buffs in the future.

So how do i keep the health bar a static width and change the health bar size by the amount of health my enemy is dealing. Please help

Thanks

  • GlennBrann