how to create a rule that returns a random number between two numbers???
Good evening to all,
Does anyone know how to create a rule that returns a random number between two numbers does not close?
example between 3 and 8 not counting 4-5-6-7
Does anyone know how to create a rule that returns a random number between two numbers does not close?
example between 3 and 8 not counting 4-5-6-7
Comments
Do you want the rule to randomly pick either 3 or pick 8?
At least that's how I took his question. I was going to answer it as I'm familiar with random, but I don't know how to achieve what he is going for.
whenever you want the random number to be generated, have a change attribute behavior changing randomnumber to random(1,8)
Youll have to go threw the expression drop down and pick random, then replace min and max with the lowest possible number, and the highest possible number you want.
Cheers
IF you wanted to pick between say 3 and only 8 this is a easy way to do it it.
you could set it up the same as above except have a extra attibute called generated number
then have a rule when attribute randomnumber is equal to or less then 4, change attribute generated number to 3
then have another rule when attribute random number greater then 4, change atibute generated number to 8
that will only pick betwwen those 2 numbers depending on the random number made
cheers
He could be thinking about a missle doing 3 damage sometimes 8 damage. he could be talking about something like rolling of the dice. Like in a DND style game. He could be talking about a image int he background that a simple animation could fix.
__________________
Coming Soon!: Sweepr
when X=1 change attribute A=3
when X=2 change attribute A=8
Calvin