For this exercise, assume the usr's var "bonusaccuracy" is equal to 5.
Would if(prob((25)+(usr.bonusaccuracy))) be the same as if(prob(30))?
If not, what would be a way to achieve a system like this?
ID:177614
![]() Aug 19 2002, 2:11 pm
|
|
![]() Aug 19 2002, 2:23 pm
|
|
yes, it's the same, but you don't need all the extra parenthesis ((25), (usr.bonusaccuracy)).
|
Thanks for the quick response. However, I'll put all the parentheses I want on them.
[Update] I just attempted this in my test game, and the prob() doesn't seem to be doing anything, since when I attack something, there is no result. [Update 2] Seems it was a bit of poor indenting on my part. Problem fixed. |
prob() only returns true if the probability is hit. A 30% probability probably doesn't hit too often. Try upping it to like 80 or some other high number for testing and see if you get a result then.
|