Random Damage

For questions about using Classic.

Post » Mon May 30, 2011 3:02 am

I'm doing trying to do a random damage forumla.
Example: [11 x RANDOM(1~1.125) - DEF] x STR x (Lv+STR)/256]

[code:aw6wwijx]
[11 x RANDOM(1~1.125) - 100] x STR x (4+123)/256]]
[/code:aw6wwijx]

How would I write this "RANDOM(1~1.125)" as? random(1+1.125)?
[code:aw6wwijx]
(11 x floor(RANDOM(1+1.125)) - 100] x STR x (4+123)/256))
[/code:aw6wwijx]
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Mon May 30, 2011 3:46 am

[quote:2ff65doh]How would I write this "RANDOM(1~1.125)" as? random(1+1.125)?[/quote:2ff65doh]
It would be 1+random(0.125).
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Mon May 30, 2011 4:58 am

R0J0hound, if I had money, I donate to you. Not just for this, but for all the times you have helped me.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests