and "Thank you" for thanking me, that's all I ask for - and maybe a pint of Guinness if you ever see me out, possibly a packet of crisps and if you ever win the lottery.... <img src="smileys/smiley1.gif" border="0" align="middle" />
As I understand it:
lerp (a,b,p) takes the difference of a and b and then finds p of it
so lerp (a,b,0.5) would find halfway between a and b
lerp (5,9,0.5) would give 2
now in your case you only want a set percentage as we are always going from 0 so you would probably be better with setting gvHealingAmount to be heal*0.5 (if you wanted to take half for example) (we dont need the lerp)
but if you go with what I said above (one gulp heals half of your lost health) then lerp is ideal.
ceil (X) just rounds up the the next whole number.
yes - my version just take some of the health left in the bottle and add it to your players health.