I'm pulling numbers from an array and once the number is pulled it is removed from the array.
This is my code:
Now this works fine but now I'd like to be able to only pull from part of the same array.
So how would I go about only pulling from say numbers 1 - 12?
This is my code:
Code:
$gameVariables.setValue(453, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52]);
$gameVariables.setValue(454, $gameVariables.value(453).splice(Math.floor(Math.random() * $gameVariables.value(453).length), 1))
Now this works fine but now I'd like to be able to only pull from part of the same array.
So how would I go about only pulling from say numbers 1 - 12?