reload: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(23 intermediate revisions by 4 users not shown) | |||
Line 18: | Line 18: | ||
|gr1= Weapons | |gr1= Weapons | ||
|descr= Reload | |descr= | ||
Main syntax: Reload first found muzzle that needs reloading (with some inconsistencies).<br> | |||
Alternative syntax: 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 the best matching magazine for the provided 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 an empty array <sqf inline>[]</sqf> is given, the behaviour is similar to pressing the "Reload" key. | |||
The command reloads the given muzzle but does not select it. In case of [[currentThrowable|throwable]] muzzles, each throwable has its own muzzle, they are autoreloaded after throw. | |||
Using [[reload]] on the throwable muzzle will just swap throwable for another one of the same type from inventory. | |||
|s1= [[reload]] unitName | |s1= [[reload]] unitName | ||
Line 27: | Line 33: | ||
|s2= unit [[reload]] [muzzle, magazine] | |s2= unit [[reload]] [muzzle, magazine] | ||
|s2since= | |s2since= arma3 2.08 | ||
|p21= unit: [[Object]] - person | |p21= unit: [[Object]] - person | ||
|p22= muzzle | |||
|p23= magazine | |p22= muzzle: [[String]] - (Optional, default [[currentMuzzle]]) muzzle name or "" for the current muzzle. | ||
|p23= magazine: [[String]] - (Optional, default given muzzle magazine) magazine name or "" for given muzzle's magazine. If given muzzle is [[currentMuzzle]] then [[currentMagazine]] | |||
|r2= [[Boolean]] - [[true]] on success | |r2= [[Boolean]] - [[true]] on success | ||
|x1= < | |x1= <sqf>if (needReload player == 1) then { reload player };</sqf> | ||
|x2= <sqf>player reload ["GL_3GL_F", "1Rnd_HE_Grenade_shell"];</sqf> | |||
|x3= Reload current muzzle: | |||
<sqf>player reload [];</sqf> | |||
|seealso= [[reloadEnabled]] | |seealso= [[reloadEnabled]] [[needReload]] [[enableReload]] [[setWeaponReloadingTime]] | ||
}} | }} |
Latest revision as of 10:06, 3 October 2023
Description
- Description:
- Main syntax: Reload first found muzzle that needs reloading (with some inconsistencies).
Alternative syntax: 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 the best matching magazine for the provided 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 an empty array [] is given, the behaviour is similar to pressing the "Reload" key. The command reloads the given muzzle but does not select it. In case of throwable muzzles, each throwable has its own muzzle, they are autoreloaded after throw. Using reload on the throwable 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: String - (Optional, default currentMuzzle) muzzle name or "" for the current muzzle.
- magazine: String - (Optional, default given muzzle magazine) magazine name or "" for given muzzle's magazine. If given muzzle is currentMuzzle then currentMagazine
- Return Value:
- Boolean - true on success
Examples
- Example 1:
- Example 2:
- Example 3:
- Reload current muzzle:
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