Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » random non repeating number generator
- bigoof33
-
4 posts
random non repeating number generator
does anyone know of a way to make a rng that doesn't repeat?
what I want is a rng that generates a number and then will not repeat the previous number. I also do not want the rng to STOP generating number.
thanks
what I want is a rng that generates a number and then will not repeat the previous number. I also do not want the rng to STOP generating number.
thanks
- CookingAndCars
-
29 posts
random non repeating number generator
How about this? Also, instead of forever, you could use repeat blank times
Last edited by CookingAndCars (Dec. 22, 2018 23:48:20)
- CookingAndCars
-
29 posts
random non repeating number generator
Okay, just updated post. Messed up on code
- bigoof33
-
4 posts
random non repeating number generator
I don't really know how that would work in my case, can you check out the project? its called omega flowey 0.4
the way the rng works is that it broadcasts a random number between 1 and 5 that corresponds to an “attack” and then the projectile receives it and plays the attack. the problem is (if you haven't already noticed) is that when an attack repeats itself, it copies itself or something weird and then the game lags a bunch…
the way the rng works is that it broadcasts a random number between 1 and 5 that corresponds to an “attack” and then the projectile receives it and plays the attack. the problem is (if you haven't already noticed) is that when an attack repeats itself, it copies itself or something weird and then the game lags a bunch…
- bigoof33
-
4 posts
random non repeating number generator
wow thanks! the only thing that is wrong is that I think attack 4 and 5 cannot happen after each other or something, but I can easily fix that. thanks again
- Discussion Forums
- » Help with Scripts
-
» random non repeating number generator