weaponsTurret: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Split examples) |
||
Line 22: | Line 22: | ||
|x1= <code>_weapons <nowiki>=</nowiki> vehicle player '''weaponsTurret''' [0,0]</code> |= Example 1 | |x1= <code>_weapons <nowiki>=</nowiki> vehicle player '''weaponsTurret''' [0,0]</code> |= Example 1 | ||
|x2= <code>_weapons <nowiki>=</nowiki> _tank '''weaponsTurret''' [0]</code> |= Example 2 | |x2= <code>_weapons <nowiki>=</nowiki> _tank '''weaponsTurret''' [0]</code> |= Example 2 | ||
|x3= <code>_driverWeapon <nowiki>=</nowiki> _ka50pilot '''weaponsTurret''' [-1] | |x3= <code>_driverWeapon <nowiki>=</nowiki> _ka50pilot '''weaponsTurret''' [-1]</code> |= Example 3 | ||
_weaponsForAnyTurrentPosition <nowiki>=</nowiki> (vehicle player) '''weaponsTurret''' ((assignedVehicleRole player) select 1)</code> |= Example | |x4= <code>_weaponsForAnyTurrentPosition <nowiki>=</nowiki> (vehicle player) '''weaponsTurret''' ((assignedVehicleRole player) select 1)</code> |= Example 4 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 37: | Line 37: | ||
<dt class="note>'''[[User:kju|kju]]'''</dt> | <dt class="note>'''[[User:kju|kju]]'''</dt> | ||
<dd class="note"> | <dd class="note"> | ||
Use [[assignedVehicleRole]] in combination to easily determine the weapons for any vehicle position. You need to check for -1 if the unit is in the driver/pilot position. See example 3. | Use [[assignedVehicleRole]] in combination to easily determine the weapons for any vehicle position. You need to check for -1 if the unit is in the driver/pilot position. See example 3 and 4. | ||
</dd> | </dd> | ||
Revision as of 18:31, 11 March 2011
Description
- Description:
- Returns all weapons of given turret. Use turret path [-1] for driver's turret.
- Groups:
- Uncategorised
Syntax
- Syntax:
- vehicle weaponsTurret turretPath
- Parameters:
- vehicle: Object
- turretPath: Array
- Return Value:
- Array of Strings
Examples
- Example 1:
_weapons = vehicle player weaponsTurret [0,0]
- Example 2:
_weapons = _tank weaponsTurret [0]
- Example 3:
_driverWeapon = _ka50pilot weaponsTurret [-1]
- Example 4:
_weaponsForAnyTurrentPosition = (vehicle player) weaponsTurret ((assignedVehicleRole player) select 1)
Additional Information
- See also:
- addMagazineTurretmagazinesTurretremoveMagazinesTurretremoveMagazineTurretweaponsassignedVehicleRole
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
- Posted on 11 March 2011
- kju
- Use assignedVehicleRole in combination to easily determine the weapons for any vehicle position. You need to check for -1 if the unit is in the driver/pilot position. See example 3 and 4.