hi everyone i have a small question about math problems in blender game engine , so … is it possible to tell blender to pick a random number between two values BUT every time it picks one it make sure that it’s not the same last one ? let’s say you have a minimum of 0 and a maximum of 10 you pick a number between these two values every second , and you choosed 3 for example after that you choose another number that should be not the current valeu which is 3 ! i am using ALWAYS sensor conected to a RANDOM actuator for now , could this be done with python ?? , i hope my talk reached your kind brain correctly
you can use shuffle from random python module.
The steps are:
- create a list.
- shuffle the list.
- select and remove the last item in the list (and print it)
shuffle.blend (456.1 KB)
(blender 2.79)
3 Likes
sorry , but can you explain more how this works ? because i don’t know python