ID:162780
Nov 27 2007, 3:28 pm
|
|
I want to make skills cost a % of a person's max energy(mana,chakra,MP) or whatever. Anyone know how to do that?
|
In response to Redlion
|
|
Ok, you just confused the hell out of me...
|
In response to Lundex
|
|
Its simple math
if the skill takes 10% and you have 300 mp You would want to do 300/100 and then * by 10 300/100 because cent is 100 and then 10 because you want 10 per 100 and then you would subtract that from 300 X = src.mp/100*10 to shorten it is 10/100 with is .1 so that means X = src.mp/.1 which also means that you can do it the most effencet way. src.mp - = src.mp*.1 You try now, Do 23% |
(use at your own risk ^_^)