I'm trying to make a bullet use a % for damage that scales up or down. If that makes sense?
Something like this..
Base Damage * % = Damage of bullet to the targets health.
So..
10 * 50% = Bullet does 5 damage.
I'm not sure how to start this. How do I make the bullet use a % and use the base damage the player currently has to make the total damage?
Give the bullet an instance variable 'damage'.
When firing the bullet give 'damage' the value BaseDamage * (pct / 100)
You need some logic to give a value to 'pct' (%)
When the bullet hits, calculate damage based on 'damage'
Develop games in your browser. Powerful, performant & highly capable.
It works! Thanks for helping! (love ya) :3