needReload: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma1 |Game name=
| arma1 |Game name=
Line 7: Line 6:


|gr1= Weapons |GROUP1=
|gr1= Weapons |GROUP1=
____________________________________________________________________________________________


| Return how much vehicle wants to reload its weapons. |DESCRIPTION=
| Return how much vehicle wants to reload its weapons. |DESCRIPTION=
____________________________________________________________________________________________


| '''needReload''' vehicle |SYNTAX=
| '''needReload''' vehicle |SYNTAX=
Line 17: Line 14:


| [[Number]] Range: 0-1, 0: full mag, 1: empty mag  |RETURNVALUE=
| [[Number]] Range: 0-1, 0: full mag, 1: empty mag  |RETURNVALUE=
____________________________________________________________________________________________
|x1=<code>_seriousness = '''needReload''' _vehicle;</code> |EXAMPLE1=
|x1=<code>_seriousness = '''needReload''' _vehicle;</code> |EXAMPLE1=
|x2=<code>[[if]] ([[needReload]] [[player]] == 1) [[then]] {'''reload''' [[player]]};</code> |EXAMPLE2=
|x2=<code>[[if]] ([[needReload]] [[player]] == 1) [[then]] {'''reload''' [[player]]};</code> |EXAMPLE2=

Revision as of 01:58, 17 January 2021

Hover & click on the images for description

Description

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

Syntax

Syntax:
needReload vehicle
Parameters:
vehicle: Object
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};

Additional Information

See also:
reloadreloadEnabledenableReload

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

Bottom Section

Posted on July 3, 2019 - 23:05 (UTC)
demellion
It seems that for player it always returns 1