Thanks Zach,
Would that be the same as having a seeded random number?
I need to be able to have a random function that whilst random can always reproduce the same "randomness" if the seed is the same.
For example if I have this array [a,b,c,d,e,f,g] and need to pick 3 random elements:
If I seeded your random function with "1" I would always pick d,e,f
If I then seeded it with "4" I would always pick a,f,g and so on
When I build games I have to add randomness, but the game needs to be recreatable. I currently use a cut down version of https://chancejs.com/ but if GSAP was able to do this that would be awesome.
Thanks for your help
Matt