100 - 50 * ((0 / 100) + (50 / 100)) = 75 Right
Thats on a normal calculator
now when I go into clickteam fusion and
subtract 50 * ((0 / 100) + (50 / 100)) from a value, nothing happen.
Basically I wanted to do when you use a fire attack on a creature that is weak agains fire it does 50% more damage. So 50% of 50 is 25 so 50 + 25 is 75. But it won't do it.
The code was a bit more complicated but I even put in what it says right there.
Here is it without being cut into numbers
Fire at( "Player" ) * ( ( Fire Res( "Enemie" ) / 100 ) + ( Fire Weak( "Enemie" ) / 100 ) )
Fire at being whatever number but in this case 50
Fire Res being 0 at this current moment
Fire Weak being 50
I wanted to have equipment that changed the % of damage vs monsters, also taking into account resistance and weaknesses.
So basically why does
subtract 50 * ((0 / 100) + (50 / 100))
Do nothing???
Edit - someone just made me aware that following different rules of maths it equals 25. Which in that case is okay, because all I need to do is at that on to the original normal attack. But it still doesnt do it.
so say i done
(50 * ((0 / 100) + (50 / 100)))+ 50
or something like that. basically just adding everything there and 50...it just works it out to 50!
If you want MMF to handle decimal values in an expression, just add it yourself. For example: 1/2.0 = 0.5. If you just say 1/2, MMF will return 0. I suppose this design choice was made because it's more memory intensive to handle all operations as floats instead of integers.
(( "Player" )*1.0) * ( (( Fire Res( "Enemie" )*1.0) / 100 ) + (( Fire Weak( "Enemie" )*1.0) / 100 ) )
all decimal values you wish to use, you need to ((value)*1.0) to force it to a float. To get decimals.