Invert GMLscripts.com

array

NOTE: The GameMaker [array, literal, value] works similarly and obsoletes this script. It has been removed from the site index and appears here for historical purposes only.

Returns an array populated by given arguments.

names = array("Charlie", "Juliett", "Mike", "Oscar", "Romeo", "Victor");

//  names[0] == "Charlie"
//  names[1] == "Juliett"
//  names[2] == "Mike"
//  names[3] == "Oscar"
//  names[4] == "Romeo"
//  names[5] == "Victor"
array(value,...)
Returns an array populated by given arguments.
COPY/// array(value,...)
//
//  Returns an array populated by given arguments.
//
/// GMLscripts.com/license
{
    var r, i = argument_count;
    while (--i >= 0) r[i] = argument[i];
    return r;
}

Contributors: YellowAfterlife

GitHub: View · Commits · Blame · Raw