do this,
make a globalvar "randomnr" and a textobject
then system every second set "randomnr" to ceil(random(0,10))
and every second set text to randomnr
then you will see exactly how the random number is generated
the expression "ceil" wil round a number like 0.3564 to 1 (always the upper integer)
if this gives a correct number i dont see way i wouldn't work