Hi,
Ok, this one might seem odd at first but it has infact a lot of use cases.
So image a deck of card ( the current hot topic on this forum): you want to pick 5 of them to give the player a hand. You need a system that must not pick the same card again, this is an obvious statement but difficult to put into an algorithm if you are not used to scripting technics.
Based on that example, I made a simple action, that let you pick them cards.
let's say 10: we will have 1 2 3 4 5 6 8 9 10 to pick from, and we want to pick 5 of them
so this action will first pick let's say 3, the pool is now 1 2 4 5 6 7 8 9 10,
next pick, let's say 5, the pool is now 1 2 4 6 7 8 9 10
And so on
so if we actually pick all of them ( pool count being equal to the serie count), we end up with a simple shuffle system.
It works with ints, so you define first the range or pool to pick ints from. Why ints?, because they are easy to work with and most of the time represent a reference you work with.
It's also something you can and should use with ArrayMaker, so that you can pick unique items from an array and be sure you don't get twice the same in the process, and you can use a ArrayListGet action and simply pass that int you got from this system.
If anyone has problems grasping this, let me know, and I'll do a working sample.
The action name is
GetNextRandomIntyou can get this action on the
Ecosystem, or preview its
code source on GithubBye,
Jean