Unique Random
I want to make a function that generates a random number while excluding a given number.
Example:
generate a random number between 0 - 2 until it is not equal to 1
then return that value
not exactly working....
fn generateRandomNumber = ( rNum = random 0 2 if rNum == 1 do ( generateRandomNumber() ) return rNum ) generateRandomNumber()
Comments
Does this seem right?
I'll have to put a check in here incase the min and max values are the same. otherwise it crashes.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Find unused p3 value in array
I don't know, maybe this or i'm wrong.
bga
Check this out. It's what I
Check this out.
It's what I needed it for.
http://jokermartini.com/2012/05/09/cobwebs/
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Thanks for you help. I really
Thanks for you help.
I really appreciate it.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Can I ask you what do you
Can I ask you what do you need this stopRandom FN?
Are you still have a problem with the "intersection in time"?
bga
I just saw. For the Cobwebs
I just saw. For the Cobwebs script. Fantastic idea :)
bga
StopRandom FN
Hi John,
If I understood you well, this is what you looking for
bga
Why the x = 0?Here is a
Why the x = 0?
Here is a revision to it.
Check it out.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Sorry i forgot to remove
Sorry i forgot to remove it. :)
If you need round float use
But you probably know this already:)
bga