Skip to content

array_shuffle

Hyomoto edited this page Jun 24, 2021 · 3 revisions
Jump To Go Back Arguments

array_shuffle( array, *rand )

Returns: array

Throws: InvalidArgumentType

Returns a new array with the contents of the original array shuffled. Utilizes a Fisher-Yates shuffle. If an array is not provided, InvalidArgumentType will be thrown. If rand is defined, that will be used instead of the default GMS randomization. If rand is defined but is not of type Randomizer, InvalidArgumentType will be thrown.

Arguments

Name Type Purpose
array array The array to shuffle
*rand [__Randomizer__](__randomizer__) If specified, will be used instead of GMS' functions
Clone this wiki locally