How do I round damage up
Say like I do an attack.
it does like say.... 0.33245
how can I round that up to the nearest whole number?
also:
How do I use prob()?
I read the DM guide but didn't understand it well
ID:169194
![]() Jul 20 2005, 1:18 pm
|
|
that was quick
Thanks alot! [edit] var/damage = src.CPL this is what I use. but it doesn't work. when some one attacks with low PL (say 5) it does 0 damage when some one higher (say at 15) it does 1 did I do something incorrect? |
I guess someone will have to test that out. That someone will be me unless someone else gets back with that answer before I'm at the library again.. which will be 6pm est.
|
Looks like the answer is yes, the min/max can be either order. Your problem lies somewhere other than that, and I don't know what. Keep plugging away. I solved a problem once by rewriting the whole portion of code I was using. Try that after cut-pasting to a safe spot or commenting it out temporarily.
|
That'll basically make t a random number from 5 to 10, then divide it by 2, then round it up. Then, it'll check if(%chance) and he'll win.