flatten: Difference between revisions
Jump to navigation
Jump to search
(examples) |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3dev | | arma3dev | ||
|2.01 | |2.01 | ||
|gr1= Arrays | |gr1= Arrays | ||
| Flattens an array. | | Flattens an array. | ||
| [[flatten]] array | | [[flatten]] array | ||
|p1= array: [[Array]] | |p1= array: [[Array]] | ||
| [[Array]] - Flattened array | | [[Array]] - Flattened array | ||
|x1= <code>[[flatten]] [ 1, [2], <nowiki>[[3]]</nowiki>, [[[4]]] ];{{cc|Returns [1, 2, 3, 4]}}</code> | |x1= <code>[[flatten]] [ 1, [2], <nowiki>[[3]]</nowiki>, [[[4]]] ];{{cc|Returns [1, 2, 3, 4]}}</code> | ||
|x2= <code>[[flatten]] [[getUnitLoadout]] [[player]];</code> | |x2= <code>[[flatten]] [[getUnitLoadout]] [[player]];</code> | ||
| [[arrayIntersect]] | | [[arrayIntersect]] | ||
}} | }} |
Revision as of 00:35, 18 January 2021
Description
- Description:
- Flattens an array.
- Groups:
- Arrays
Syntax
Examples
- Example 1:
flatten [ 1, [2], [[3]], [[[4]]] ];// Returns [1, 2, 3, 4]
- Example 2:
flatten getUnitLoadout player;
Additional Information
- See also:
- arrayIntersect
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
[[Category:Introduced with arma3dev version 2.01]][[ Category: arma3dev: New Scripting Commands | FLATTEN]][[ Category: arma3dev: Scripting Commands | FLATTEN]]