needReload: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma1 |Game name=
| arma1


|1.00|Game version=
|1.00


|gr1= Weapons |GROUP1=
|gr1= Weapons


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


| '''needReload''' vehicle |SYNTAX=
| '''needReload''' vehicle


|p1= vehicle: [[Object]] |PARAMETER1=
|p1= vehicle: [[Object]]


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


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


}}
}}

Revision as of 01:25, 18 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

Bottom Section

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