Skip to content

Array tools

A collection of utilities and tools for working with arrays.

Authors and contributors to this community extension: arthuro555.


Note: The v2.0.0 is not compatible with v1.0.0. If you update, you wil have to update ALL USAGES of the extension.

This extension adds features like:

  • Combining arrays (concatenate into new array, append all children to another array)
  • Finding a value in an array (find index expression, contains condition)
  • Reversing arrays
  • Get a portion of an array (slice)
  • Add and remove lots of children at specific indices at once (fill, splice, shift, pop, add at index)
  • Randomness (shuffle children, get a random child)
  • Mathematical operations using arrays (sum of all numbers, biggest/smallest number, average number, median number)
  • Sort numbers in an array
  • String inter-operation (split string into array, join array array children to string)

Tip

Learn how to install new extensions by following a step-by-step guide.

Actions

Append all variable to another array
Appends a copy of all variables of one array to another array.

Combine 2 arrays
Combines all elements of 2 scene arrays into one new scene array.

Fill array with number
Fill an element with a number.

Flatten array
Replaces all arrays inside of an array with their children. For example, [[1,2], [3,4]] becomes [1,2,3,4].

Append all variable to another array
Appends a copy of all variables of one array to another array.

Combine 2 arrays
Combines all elements of 2 scene arrays into one new scene array.

Fill array with number
Fill an element with a number.

Flatten array
Replaces all arrays inside of an array with their children. For example, [[1,2], [3,4]] becomes [1,2,3,4].

Insert variable at
Insert a variable at a specific index of an array.

Pop array child
Removes the last array child of an array, and stores it in another variable.

Reverse an array
Reverses children of an array. The first array child becomes the last, and the last array child becomes the first.

Shift array child
Removes the first array child of an array, and stores it in another variable.

Shuffle array
Shuffles all children of an array.

Slice an array
Copies a portion of a scene array variable into a new scene array variable.

Sort an array
Sort an array of number from smallest to biggest.

Splice an array
Cuts a portion of an array off.

Split string into array
Split a string into an array of strings via a separator.

Insert variable at
Insert a variable at a specific index of an array.

Append all variable to another array
Appends a copy of all variables of one array to another array.

Combine 2 arrays
Combines all elements of 2 scene arrays into one new scene array.

Fill array with number
Fill an element with a number.

Flatten array
Replaces all arrays inside of an array with their children. For example, [[1,2], [3,4]] becomes [1,2,3,4].

Insert variable at
Insert a variable at a specific index of an array.

Pop array child
Removes the last array child of an array, and stores it in another variable.

Reverse an array
Reverses children of an array. The first array child becomes the last, and the last array child becomes the first.

Shift array child
Removes the first array child of an array, and stores it in another variable.

Shuffle array
Shuffles all children of an array.

Slice an array
Copies a portion of a scene array variable into a new scene array variable.

Sort an array
Sort an array of number from smallest to biggest.

Splice an array
Cuts a portion of an array off.

Split string into array
Split a string into an array of strings via a separator.

Pop array child
Removes the last array child of an array, and stores it in another variable.

Reverse an array
Reverses children of an array. The first array child becomes the last, and the last array child becomes the first.

Shift array child
Removes the first array child of an array, and stores it in another variable.

Shuffle array
Shuffles all children of an array.

Slice an array
Copies a portion of a scene array variable into a new scene array variable.

Sort an array
Sort an array of number from smallest to biggest.

Splice an array
Cuts a portion of an array off.

Split string into array
Split a string into an array of strings via a separator.

Conditions

Array has number
Checks if an array contains a specific number.

Array has string
Checks if an array contains a specific string.

Index of number
Compare The index of the first variable that equals to a specific number in an array.

Index of text
Compare The index of the first variable that equals to a specific text in an array.

Last index of number
Compare The index of the last variable that equals to a specific number in an array.

Last index of text
Compare The index of the last variable that equals to a specific text in an array.

Get and remove last variable from array (as number)
Compare Removes the last array child of an array, and return it as a number.

Random number in array
Compare Returns a random number of an array of numbers.

Random string in array
Compare a random string of an array of strings.

Array has number
Checks if an array contains a specific number.

Array has string
Checks if an array contains a specific string.

Index of number
Compare The index of the first variable that equals to a specific number in an array.

Index of text
Compare The index of the first variable that equals to a specific text in an array.

Last index of number
Compare The index of the last variable that equals to a specific number in an array.

Last index of text
Compare The index of the last variable that equals to a specific text in an array.

Array has number
Checks if an array contains a specific number.

Array has string
Checks if an array contains a specific string.

Index of number
Compare The index of the first variable that equals to a specific number in an array.

Index of text
Compare The index of the first variable that equals to a specific text in an array.

Last index of number
Compare The index of the last variable that equals to a specific number in an array.

Last index of text
Compare The index of the last variable that equals to a specific text in an array.

Get and remove last variable from array (as number)
Compare Removes the last array child of an array, and return it as a number.

Random number in array
Compare Returns a random number of an array of numbers.

Random string in array
Compare a random string of an array of strings.

Get and remove last variable from array (as number)
Compare Removes the last array child of an array, and return it as a number.

Random number in array
Compare Returns a random number of an array of numbers.

Random string in array
Compare a random string of an array of strings.

Expressions

Expression Description
ArrayTools::GlobalIndexOf(global variable, number) Return The index of the first variable that equals to a specific number in an array.
🗄️ Global variable Array to search the value in
🔢 Number Number to search in the array
ArrayTools::GlobalIndexOfStr(global variable, string) Return The index of the first variable that equals to a specific text in an array.
🗄️ Global variable Array to search the value in
string String to search in the array
ArrayTools::GlobalJoin(global variable, string) Returns a string made from all strings in an array.
🗄️ Global variable The name of the array to join into a string
string Optional separator text between each element
ArrayTools::GlobalLastIndexOf(global variable, number) Return The index of the last variable that equals to a specific number in an array.
🗄️ Global variable Array to search the value in
🔢 Number Number to search in the array
ArrayTools::GlobalLastIndexOfStr(global variable, string) Return The index of the last variable that equals to a specific text in an array.
🗄️ Global variable Array to search the value in
string String to search in the array
ArrayTools::GlobalMax(global variable) Gets the biggest number in an array.
🗄️ Global variable The array
ArrayTools::GlobalMean(global variable) Gets the average number in an array.
🗄️ Global variable The array
ArrayTools::GlobalMedian(global variable) Gets the median number in an array.
🗄️ Global variable The array
ArrayTools::GlobalMin(global variable) Gets the smallest number in an array.
🗄️ Global variable The array
ArrayTools::GlobalPopNumber(global variable) Return Removes the last array child of an array, and return it as a number.
🗄️ Global variable Array to pop a child from
ArrayTools::GlobalPopString(global variable) Removes the last array child of an array, and return it as a string.
🗄️ Global variable Array to pop a child from
ArrayTools::GlobalRandomNumberInArray(global variable) Return Returns a random number of an array of numbers.
🗄️ Global variable Array to get a number from
ArrayTools::GlobalRandomStringInArray(global variable) Return a random string of an array of strings.
🗄️ Global variable Array to get a string from
ArrayTools::GlobalShiftNumber(global variable) Removes the first array child of an array, and return it as a number.
🗄️ Global variable Array to shift a child from
ArrayTools::GlobalShiftString(global variable) Removes the first array child of an array, and return it as a string.
🗄️ Global variable Array to shift a child from
ArrayTools::GlobalSum(global variable) Get the sum of all numbers in an array.
🗄️ Global variable The array
ArrayTools::IndexOf(scene variable, number) Return The index of the first variable that equals to a specific number in an array.
🗄️ Scene variable Array to search the value in
🔢 Number Number to search in the array
ArrayTools::IndexOfStr(scene variable, string) Return The index of the first variable that equals to a specific text in an array.
🗄️ Scene variable Array to search the value in
string String to search in the array
ArrayTools::Join(scene variable, string) Returns a string made from all strings in an array.
🗄️ Scene variable The name of the array to join into a string
string Optional separator text between each element
ArrayTools::LastIndexOf(scene variable, number) Return The index of the last variable that equals to a specific number in an array.
🗄️ Scene variable Array to search the value in
🔢 Number Number to search in the array
ArrayTools::LastIndexOfStr(scene variable, string) Return The index of the last variable that equals to a specific text in an array.
🗄️ Scene variable Array to search the value in
string String to search in the array
ArrayTools::Max(scene variable) Gets the biggest number in an array.
🗄️ Scene variable The array
ArrayTools::Mean(scene variable) Gets the average number in an array.
🗄️ Scene variable The array
ArrayTools::Median(scene variable) Gets the median number in an array.
🗄️ Scene variable The array
ArrayTools::Min(scene variable) Gets the smallest number in an array.
🗄️ Scene variable The array
ArrayTools::ObjectIndexOf(object, object variable, number) Return The index of the first variable that equals to a specific number in an array.
👾 Object The object the variable is from
🗄️ Object variable Array to search the value in
🔢 Number Number to search in the array
ArrayTools::ObjectIndexOfStr(object, object variable, string) Return The index of the first variable that equals to a specific text in an array.
👾 Object The object the variable is from
🗄️ Object variable Array to search the value in
string String to search in the array
ArrayTools::ObjectJoin(object, object variable, string) Returns a string made from all strings in an array.
👾 Object The object the variable is from
🗄️ Object variable The name of the array to join into a string
string Optional separator text between each element
ArrayTools::ObjectLastIndexOf(object, object variable, number) Return The index of the last variable that equals to a specific number in an array.
👾 Object The object the variable is from
🗄️ Object variable Array to search the value in
🔢 Number Number to search in the array
ArrayTools::ObjectLastIndexOfStr(object, object variable, string) Return The index of the last variable that equals to a specific text in an array.
👾 Object The object the variable is from
🗄️ Object variable Array to search the value in
string String to search in the array
ArrayTools::ObjectMax(object, object variable) Gets the biggest number in an array.
👾 Object The object the variable is from
🗄️ Object variable The array
ArrayTools::ObjectMean(object, object variable) Gets the average number in an array.
👾 Object The object the variable is from
🗄️ Object variable The array
ArrayTools::ObjectMedian(object, object variable) Gets the median number in an array.
👾 Object The object the variable is from
🗄️ Object variable The array
ArrayTools::ObjectMin(object, object variable) Gets the smallest number in an array.
👾 Object The object the variable is from
🗄️ Object variable The array
ArrayTools::ObjectPopNumber(object, object variable) Return Removes the last array child of an array, and return it as a number.
👾 Object The object the variable is from
🗄️ Object variable Array to pop a child from
ArrayTools::ObjectPopString(object, object variable) Removes the last array child of an array, and return it as a string.
👾 Object The object the variable is from
🗄️ Object variable Array to pop a child from
ArrayTools::ObjectRandomNumberInArray(object, object variable) Return Returns a random number of an array of numbers.
👾 Object The object the variable is from
🗄️ Object variable Array to get a number from
ArrayTools::ObjectRandomStringInArray(object, object variable) Return a random string of an array of strings.
👾 Object The object the variable is from
🗄️ Object variable Array to get a string from
ArrayTools::ObjectShiftNumber(object, object variable) Removes the first array child of an array, and return it as a number.
👾 Object The object the variable is from
🗄️ Object variable Array to shift a child from
ArrayTools::ObjectShiftString(object, object variable) Removes the first array child of an array, and return it as a string.
👾 Object The object the variable is from
🗄️ Object variable Array to shift a child from
ArrayTools::ObjectSum(object, object variable) Get the sum of all numbers in an array.
👾 Object The object the variable is from
🗄️ Object variable The array
ArrayTools::PopNumber(scene variable) Return Removes the last array child of an array, and return it as a number.
🗄️ Scene variable Array to pop a child from
ArrayTools::PopString(scene variable) Removes the last array child of an array, and return it as a string.
🗄️ Scene variable Array to pop a child from
ArrayTools::RandomNumberInArray(scene variable) Return Returns a random number of an array of numbers.
🗄️ Scene variable Array to get a number from
ArrayTools::RandomStringInArray(scene variable) Return a random string of an array of strings.
🗄️ Scene variable Array to get a string from
ArrayTools::ShiftNumber(scene variable) Removes the first array child of an array, and return it as a number.
🗄️ Scene variable Array to shift a child from
ArrayTools::ShiftString(scene variable) Removes the first array child of an array, and return it as a string.
🗄️ Scene variable Array to shift a child from
ArrayTools::Sum(scene variable) Get the sum of all numbers in an array.
🗄️ Scene variable The array

This page is an auto-generated reference page about the Array tools extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.