needReload: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting Commands ArmA|" to "[[Category:Scripting Commands Armed Assault|")
mNo edit summary
Line 5: Line 5:


|1.00|Game version=
|1.00|Game version=
|gr1= Weapons |GROUP1=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 10: Line 12:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Number]] <nowiki>=</nowiki>  '''needReload''' vehicle |SYNTAX=
| '''needReload''' vehicle |SYNTAX=


|p1= vehicle: [[Object]] |PARAMETER1=
|p1= vehicle: [[Object]] |PARAMETER1=
Line 16: Line 18:
| [[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>
|x1=<code>_seriousness = '''needReload''' _vehicle;</code> |EXAMPLE1=
|x2=<code>[[if]] ([[needReload]] [[player]] == 1) [[then]] {'''reload''' [[player]]};</code>
|x2=<code>[[if]] ([[needReload]] [[player]] == 1) [[then]] {'''reload''' [[player]]};</code> |EXAMPLE2=


| [[reload]], [[reloadEnabled]], [[enableReload]] |SEEALSO=
| [[reload]], [[reloadEnabled]], [[enableReload]] |SEEALSO=

Revision as of 19:22, 25 September 2020

-wrong parameter ("Arma") defined!-1.00
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