System.Every second random(a,b) not working

Bugs will be moved here once resolved.

Post » Wed Nov 09, 2011 4:51 pm

So if you go

System
Every second random(a,b)

It doesn't work. It only does the action at a instead of a random between a and b

Thank you
B
75
S
12
G
7
Posts: 406
Reputation: 9,266

Post » Wed Nov 09, 2011 6:51 pm

Post your capx, otherwise it's kinda hard to guess what exactly you are doing to check the value of the random.

Also do note that the random number will be between a and b-1 basically.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Wed Nov 09, 2011 6:54 pm

Wait do you mean (a and b) -1?
B
75
S
12
G
7
Posts: 406
Reputation: 9,266

Post » Wed Nov 09, 2011 7:03 pm

I mean this:



But really, if you share a capx (or at least a screenshot of your events) we can help, otherwise it's a guessing game.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Wed Nov 09, 2011 7:54 pm

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 workvtrix2011-11-09 19:57:18
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest