ammoOnPylon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (added SimZor example)
mNo edit summary
 
(50 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Command|=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.70


|1.70|= Game Version
|gr1= Vehicle Loadouts


____________________________________________________________________________________________
|descr= Returns ammo count on given pylon (or [[false]] on failure).


|Returns ammo count on given pylon.
|s1= vehicle [[ammoOnPylon]] pylon
Returns false ([[Bool]]) on failure.|= Description
____________________________________________________________________________________________


| vehicle '''ammoOnPylon''' (pylon name/index)|= Syntax
|p1= vehicle: [[Object]]


|p1= vehicle: [[Object]] |= Parameter 1
|p2= pylon: [[String]] or [[Number]] - pylon's name or index


|p2= pylon name/index : [[String]] or [[Number]] |= Parameter 2
|r1= [[Number]] or [[Boolean]] - [[false]] on failure


| [[Number]] or [[Bool]] |= Return Value
|x1= <sqf>private _ammoCount = (vehicle player) ammoOnPylon "pylon1";</sqf>


____________________________________________________________________________________________
|x2= <sqf>hint str (vehicle player ammoOnPylon "pylonCenter");</sqf>


|x1= <code>_ammoCount = ([[vehicle]] [[player]]) [[ammoOnPylon]] "pylon1";</code>|= Example 1
|seealso= [[Arma 3: Vehicle Loadouts]] [[setAmmoOnPylon]] [[getCompatiblePylonMagazines]] [[getPylonMagazines]] [[animatePylon]] [[animateBay]] [[setPylonsPriority]] [[setPylonLoadout]]
|x2= <code>[[hint]] [[str]] (([[vehicle]] [[player]]) '''ammoOnPylon''' "pylonCenter");</code>|= Example 2
}}
 
 
____________________________________________________________________________________________
 
[[setAmmoOnPylon]] [[getPylonMagazines]] |= See Also


{{Note
|user= Commy2
|timestamp= 20170818142100
|text= The pylon indices start at 1 and not at 0.
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- CONTINUE Notes -->
<!-- DISCONTINUE Notes -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 06:27, 7 November 2023

Hover & click on the images for description

Description

Description:
Returns ammo count on given pylon (or false on failure).
Groups:
Vehicle Loadouts

Syntax

Syntax:
vehicle ammoOnPylon pylon
Parameters:
vehicle: Object
pylon: String or Number - pylon's name or index
Return Value:
Number or Boolean - false on failure

Examples

Example 1:
private _ammoCount = (vehicle player) ammoOnPylon "pylon1";
Example 2:
hint str (vehicle player ammoOnPylon "pylonCenter");

Additional Information

See also:
Arma 3: Vehicle Loadouts setAmmoOnPylon getCompatiblePylonMagazines getPylonMagazines animatePylon animateBay setPylonsPriority setPylonLoadout

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
Commy2 - c
Posted on Aug 18, 2017 - 14:21 (UTC)
The pylon indices start at 1 and not at 0.