Warcraft III resources & community, 2003–2006 · archived

Help with random integers.

3 posts
#1

Help with random integers.

I don't understand how the action Random Integer 1 to 100 is 20 or something works, would that mean it has a 20% chance of happening or something. And how would i put it in an action like have that before the action i want to have randomly happen? Please help! :shock:
#2
It generates random number and (in ideal state) if you put If (random integer from 1 to 100) >= 50) (do something) else (do something else) it is "theoreticaly" (!!!) 50% chance for each of this events. You can use integer from 1 to 10 and test it for 5 as well.
You can also put another "if" to "else" part of previous one to test another condition etc.

(I hope you can understand, my description) :?
#3
Yes I do thank you much!