Like if i want to take a random number between 1-50 but i do not want it to take the random number again so i want to remove that number from the "integer group" kinda like unit group. Pick a random unit from unit group, if its not the right unit remove it and pick a new random unit. I want this so it can speed up the process of finding the right number.
you could make a boolean array [50]. whenever a random number is taken set the bool [x] to true. to get the next value create a custom function that returns an int.
it might happen that the function takes too long to execute, then you have to decrease the min and max values for the possible randoms (if random = 1 set minimum to 2 and so on, same for maximum) or you pick an random int, if it's already taken move up or down (random - 1) until you fiind an unsed. up to you.
It it possible to make an integer group?
Like if i want to take a random number between 1-50 but i do not want it to take the random number again so i want to remove that number from the "integer group" kinda like unit group. Pick a random unit from unit group, if its not the right unit remove it and pick a new random unit. I want this so it can speed up the process of finding the right number.
store it in a variable?
you could make a boolean array [50]. whenever a random number is taken set the bool [x] to true. to get the next value create a custom function that returns an int.
it might happen that the function takes too long to execute, then you have to decrease the min and max values for the possible randoms (if random = 1 set minimum to 2 and so on, same for maximum) or you pick an random int, if it's already taken move up or down (random - 1) until you fiind an unsed. up to you.