needReload: Difference between revisions

From Bohemia Interactive Community
No edit summary
 
(57 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.00


|1.00|= Game version
|game2= arma2
____________________________________________________________________________________________
|version2= 1.00


| Return how much vehicle wants to reload its weapons. |= Description
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| [[Number]] <nowiki>=</nowiki>  '''needReload''' vehicle |= Syntax
|game4= tkoh
|version4= 1.00


|p1= vehicle: [[Object]] |= Parameter 1
|game5= arma3
|version5= 0.50


| [[Number]] |= Return value
|gr1= Weapons
____________________________________________________________________________________________
|x1=<pre>_seriousness=  needReload _vehicle</pre>


| |= See also
|descr= Returns how much vehicle wants to reload its weapons.


}}
|s1= [[needReload]] entity
 
|p1= entity: [[Object]] - unit or vehicle
 
|r1= [[Number]] - range: 0-1, 0: full mag, 1: empty mag
 
|s2= entity [[needReload]] muzzle
|s2since= arma3 2.22
 
|p21= entity: [[Object]] - unit or vehicle
|p22= muzzle: [[String]] - muzzle to check. "" to check all muzzles


<h3 style="display:none">Notes</h3>
|r2= [[Number]] - range: 0-1, 0: full mag, 1: empty mag
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>_seriousness = needReload _vehicle;</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|x2= <sqf>if (needReload player == 1) then { reload player };</sqf>
|x3= <sqf>player needReload currentMuzzle player;</sqf>


[[Category:Scripting Commands|NEEDRELOAD]]
|seealso= [[needService]] [[reload]] [[reloadEnabled]] [[enableReload]]
[[Category:Scripting Commands ArmA|NEEDRELOAD]]
}}
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12:29, 14 October 2025

Hover & click on the images for description

Description

Description:
Returns how much vehicle wants to reload its weapons.
Groups:
Weapons

Syntax

Syntax:
needReload entity
Parameters:
entity: Object - unit or vehicle
Return Value:
Number - range: 0-1, 0: full mag, 1: empty mag

Alternative Syntax

Syntax:
entity needReload muzzle
Parameters:
entity: Object - unit or vehicle
muzzle: String - muzzle to check. "" to check all muzzles
Return Value:
Number - range: 0-1, 0: full mag, 1: empty mag

Examples

Example 1:
_seriousness = needReload _vehicle;
Example 2:
if (needReload player == 1) then { reload player };
Example 3:

Additional Information

See also:
needService reload reloadEnabled enableReload

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