currentZeroing
- Local argument
- Arma 3 v0.50
- First in Arma 2: Operation Arrowhead v1.50
Command · Markdown · JSON · original wiki page
Description
Returns current zeroing.
Syntax
Syntax 1
currentZeroing object
Parameters:
object: Object - unit (vehicles are not supported)
Returns: Number
Syntax 2
since arma3 2.04
object currentZeroing [weaponClass, muzzleClass]
Parameters:
object: Object - unit (vehicles are not supported)weaponClass: String - class name of weaponmuzzleClass: String - (Optional, default currently active muzzle or first that is found) muzzle classname
Returns: Array with [distance, zeroingIndex]
- distance: Number - distance in meters, Since Arma 3 v2.20 supports laser rangefinder value
- zeroingIndex: Number - 0 ≙ 50 m, 1 ≙ 100 m, 2 ≙ 150 m, ..., -1 for laser rangefinding
Examples
Example 1
private _zeroing = currentZeroing player;
Example 2
(player currentZeroing ["arifle_MX_GL_F", "GL_3GL_F"]) params ["_distance", "_zeroingIndex"];
Example 3
private _zeroing = currentZeroing myVehicle; // does not work
private _zeroing = currentZeroing gunner myVehicle; // works