select

From Bohemia Interactive Community
Revision as of 20:51, 9 October 2006 by Str (talk | contribs) (Fixed example (alternative and obsolete method woth boolean index))
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Selects index element of the array. Index 0 denotes the first element, 1 the second, etc.
Groups:
Uncategorised

Syntax

Syntax:
array select index
Parameters:
array: Array
index: Number
Return Value:
Any Value

Examples

Example 1:
[1,2,3,4] select 2 - result is 3
Example 2:
[1,2,3,4] select true - result is 2.
Alternative method. If the index is false, this selects the first element of the array. If it is true, it selects the second one. Obsolete syntax.
Example 3:
position player select 2 - result is Z coordinate of player position (see Position for more details)

Additional Information

See also:
See also needed

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

Notes

Bottom Section