- Joined
- Jun 2, 2009
- Messages
- 1,226
I want to increase value of Integer A from 40 to 48. In other words, i want to increase it by 20%
But i have another Integer will make this calculation.
If the Integer B 0, it i will do nothing.
But if the Integer B is 100, it must increase Integer A by 20%
And of course this percentage increasing from 0 to 20 with the Integer B
This is math question i know and i am very bad at it.
This is what exactly i want
If the damage it 36, it increases by 20% (43.4) because anatomy skill have an ability to increase damage as percent by 0-20 (anatomy skill min: 0 max: 100 and damage increases as the skill increases)
I need a template like this because in my map i will make many calculations like this.
But i have another Integer will make this calculation.
If the Integer B 0, it i will do nothing.
But if the Integer B is 100, it must increase Integer A by 20%
And of course this percentage increasing from 0 to 20 with the Integer B
This is math question i know and i am very bad at it.
-
Set TempRealMax = 24.00
-
Set TempInt = (Random integer number between (Integer(TempRealMin)) and (Integer(TempRealMax)))
-
Set DamageEventAmount = (DamageEventAmount + (Real(TempInt)))
-
/// I am adding Strength bonus in here
-
Set DamageEventAmount = (DamageEventAmount + ((Real((Strength of DamageEventSource (Include bonuses)))) x 0.10))
-
/// Now i have to add anatomy bonus
-
Set Help_Anatomy = ((Real(xSkill_Anatomy[(Player number of (Owner of DamageEventSource))])) x 0.20)
-
Set DamageEventAmount = (DamageEventAmount + Help_Anatomy)
-
Set DamageEventAmount = (DamageEventAmount + (Help_Anatomy x 0.20))
This is what exactly i want
If the damage it 36, it increases by 20% (43.4) because anatomy skill have an ability to increase damage as percent by 0-20 (anatomy skill min: 0 max: 100 and damage increases as the skill increases)
I need a template like this because in my map i will make many calculations like this.