Generate random number without repeating the last numbers?

Hi,
How can I Generate a random number ,within range ,without repeating immediately the last numbers? but with an interval ?
thank you.

1 Like

Will those numbers be float or integer?

Have a variable called PreviousRandomNumber. When you generate the random number, use a Branch to check if it matches PreviousRandomNumber. If True, regenerate the number and do the check again. If False, set the new number as PreviousRandomNumber and proceed.

You should be able to take that logic and tweak it how you need to, if you are needing specific intervals or something.

1 Like