0
Planned

Random amelioration

jpdevin 4 weeks ago in Game Creator updated by Marti (Lead Developer) 4 weeks ago 2

Your random function (say, grab a random value from a list variable) doesn't fit my needs, as it can pick the same value twice, so this is annoying for spawning prefabs (it may lead to a bug). Any clue to check if, let's say you spawn 10 prefabs, the 5th position has already assigned to a former prefab (sorry for my bad English) ? 

Unity version:
2019
Game Creator version:
1.12

Maybe the solution is to delete the value from the list variable once it's been used, but which option should I use ? Delete "current" value ? An example of spawing say 5 cubes would be appreciated. Sorry I'm a newbie, but please help.

Planned

Random numbers, by definition, accept picking an item twice in a row. However, I see your point. I'm opening a ticket to add the option so a variable can't be picked up twice until all other options have been exhausted.