View Full Version : Magazines -weapons question
How to remove the magazine from current weapon, so it will be empty? How to refill a full magazine back? (not with reload animation but silent). Thank you.
Big Dawg KS
Jul 10 2009, 16:46
The only way to empty it will be to remove all the magazines:
this removeMagazines (currentMagazine this)
But to reload (silently as you said) you can remove the weapon then add it back. This will load the weapon with a full magazine IF the unit has one, otherwise it will use the magazine with the highest remaining ammo. If you want to make sure a full magazine is loaded, add a new one.
this addMagazine (currentMagazine this); weap = currentWeapon this; this removeWeapon weap; this addWeapon weap
I just want to make a small script for ArmA1 when the user press a key, play reload sound then reload magazine of a weapon, without reload animation. During this process, of course, player can't fire.
Since removing all magazines is not a good option, plus player could press gear this time, is there a better way to prevent fire during those seconds? Mark in a global variable that the player started reloading and detect it on fire button? Mark the weapon jammed or damaged? Or save the array of magazines before, remove all and put them back? What would you do?
Big Dawg KS
Jul 13 2009, 12:59
You could try disableUserInput:
disableUserInput true
However this will disable ALL input (which can be bad if you forget to renable it). Other than that though there's no easy way to prevent the player from using default controls.
Nah, the point is that I still want to move around while reloading :) That would defeat my purpose. Tho the problem looks simple, I think its quite tricky.
PS I think I found something, the answer could be LoadEmptyMagazine action.
Solved it, check here:
http://forums.bistudio.com/showthread.php?t=79919
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.