I have 10 positions to fill.
[] [] [] [] [] [] [] [] [] []
I have 7 different items to fill those positions.
1 2 3 4 5 6 7
some items must be used 2 times, items 1 and 3.
All others need only be used once.
Now, I want to generate a random number to place the 7 items in the 10 positions.
How would I do that with the logic bricks? I have thought about this a lot, but am stumped at the point of setting the random number to generate a new number without using one that is already used?
I thought I could set it to run from 1-10 until a property is set to stop it. Then check each number against 10 properties to see if it is there, if it is, check them again to see if it is used twice. If it is to be used twice then set a prop with that number again, and then set another prop to not use that number again.
Then go through it all again. It just seems a long way around?
Thanks I will look at that. I had hoped to not use python for this little game, but it would probably make it easier in the long run. And I could use a matrix then, which the bricks dont have.
Mmph! I understand it. It is a little bit different, because I need to track the positions used and the pieces used to fill those positions.
Its to randomize the beginning of the game piece’s location each time the game is started.
That random script function looks like it would be the easiest, but I have to figure out how to apply it. I can read python script and write a little, but I havent studied it at all.