select
From Bohemia Interactive Community
Click on the images for descriptions
Introduced in
- Game:
- Operation Flashpoint
- Version:
- 1.00
Description
- Description:
- Selects an index element of an array or config object.
Index 0 denotes the first element, 1 the second, etc.
If index has decimal places it gets rounded down for fractions less than .5, otherwise it gets rounded up.
Syntax
Alternative Syntax
Examples
- Example 1:
[1,2,3,4] select 2- result is 3- Example 2:
position player select 2- result is Z coordinate of player position (see Position for more details)- Example 3:
(configFile >> "CfgVehicles") select 0
Additional Information
- Multiplayer:
- -
- See also:
- count
Notes
Notes
Notes
When combined with the count command, this can be used to read all entries out of a config; even when you don't know exactly how many entries there will be. See the notes under count for more info. --General Barron 02:02, 3 March 2009 (CET)