reload: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") |
||
Line 35: | Line 35: | ||
|r2= [[Boolean]] - [[true]] on success | |r2= [[Boolean]] - [[true]] on success | ||
|x1= < | |x1= <sqf>if (needReload player == 1) then { reload player };</sqf> | ||
|x2= < | |x2= <sqf>player reload ["GL_3GL_F", "1Rnd_HE_Grenade_shell"];</sqf> | ||
|x3= Reload current muzzle: | |x3= Reload current muzzle: | ||
<code>player reload [];</code> | <code>player reload [];</code> |
Revision as of 10:23, 13 May 2022
Description
- Description:
-
- Old syntax: Reload first found muzzle that needs reloading (with some inconsistencies).
- Alternative syntax (Since Arma 3 v2.08.148609): This syntax allows to reload given muzzle with given magazine while playing proper animation. If param is omitted or is empty string, default value is used. The default behaviour is to find best matching magazine for given muzzle from the pool of available magazines. If specific magazine is requested, the reload will fail if unit has run out of this type of magazines. If empty array [] is given, the behaviour is similar to player pressing "Reload" key. The command reloads the given muzzle but doesn't select it. In case of throwable muzzles, each throwable has own muzzle, they are autoreloaded after throw. Using reload on the trowable muzzle will just swap throwable for another one of the same type from inventory.
- Groups:
- Weapons
Syntax
Alternative Syntax
- Syntax:
- unit reload [muzzle, magazine]
- Parameters:
- unit: Object - person
- muzzle (Optional): String - muzzle name or "" for current muzzle. Default: currentMuzzle
- magazine (Optional): String - magazine name or "" for given muzzle magazine. Default: given muzzle magazine. If given muzzle is currentMuzzle then currentMagazine
- Return Value:
- Boolean - true on success
Examples
- Example 1:
- Example 2:
- Example 3:
- Reload current muzzle:
player reload [];
Additional Information
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
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Weapons