Skip to content

Instantly share code, notes, and snippets.

@katsaii
Last active September 13, 2019 23:21
Show Gist options
  • Save katsaii/9ea0de59bbf9dbb02619892dbb902bae to your computer and use it in GitHub Desktop.
Save katsaii/9ea0de59bbf9dbb02619892dbb902bae to your computer and use it in GitHub Desktop.
A hack which clones a GameMaker array
/// @desc Returns a clone of an array.
/// @param variable {Array} The array to clone.
/// @author Kat @katsaii
if (array_length_1d(argument0) < 1) then return [];
argument0[0] = argument0[0];
return argument0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment