Damage is usually a fixed single value.damage = 100If I wanted to make it a random value within a range, what would it look like?My mind is telling me something along the lines ofdamage=rand(1, 100)But I feel I should check.
Random percentage. How do you set the minimum and maximum, then?As I see that bit of code, you're rolling a random percentage between 1% and 100%. I realise I might be being stupid here.
100 from 14? Now it makes less sense.The range is between 10 and 150. Would the correct formation bedamage=10+random%150?
the random%X, the X is the max value that will be made. So 10+150 is a possibility. You want random%140Use Mugen Class. JNP didnt make it for shits-n-giggles
random%150 will return a value of 0-149.To set a range that the lowest value is anything but 0, you will use a number then add the random range to it.If you want a number between 10 and 150, you'll start with 10 then add a random number from 0-140.10+random%141