Simple way to limit Damage to 10% base health?

Post » Fri Feb 01, 2013 11:32 pm

HealthNow = The current health of the actor
BaseHealth = The health of the actor when not damaged.
Damage = How much damage is about to be done to the actor in one hit.

I need to limit DAMAGE to 10% of the base health.

What is the simplest way to do that?

This for example is WRONG:


if Damage > HealthNow
Damage = (HealthNow - (BaseHealth * 0.1)) as int
endif
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm

Return to V - Skyrim