Arma 3 Scripting

Command in Arrays

flatten

Also available as Markdown and JSON, or read the original wiki page.

Description

Flattens an array.

Syntax

flatten array

Parameters:

Returns: Array of Anything - flattened array

Examples

Example 1

flatten [1, [2], [[3]], [[[4]]]]; // returns [1, 2, 3, 4]

Example 2

flatten getUnitLoadout player;

See also

arrayIntersect