Tankbuster 1747 Posted February 10, 2017 As an uber-soldier, I like to carry everything! The MX3 GL and Titan compact are my favourites. When I step away from the Virtual Arsenal, the MX is ready to rock with a magazine in the receiver, but both the Titan and the UGL muzzle are empty and need to be reloaded before they can be used. I accept that in the real world, a soldier probably (actually, he might, I'm not qualified to say) would not run around with a missile launcher on his back with a round already in it. But the UGL? would a soldier really go into the AO with it unloaded? Anyway, realism aside, I want to have my Titan and my UGL reloaded and ready to go when I close the VA. if (needreload player) then {reload player}; Would appear to do the job, but it means you have to sit through the animations. The Titan reload anim is long. So, my question is, is there a scripted way of, without animation, putting a magazine into each muzzle? Share this post Link to post Share on other sites
gc8 981 Posted February 10, 2017 Hi have you tried https://community.bistudio.com/wiki/setWeaponReloadingTime ? that with reload command might do the trick. Share this post Link to post Share on other sites
Tankbuster 1747 Posted February 10, 2017 I haven't. That's a good place to start, I think. Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 11, 2017 you can try adding magazine with addWeaponItem Share this post Link to post Share on other sites
bad benson 1733 Posted February 11, 2017 go play COD kid!1! seriously though. i think this might be related to the age old "issue" that you have to add the magazine before the weapon to have the game load it in there. so i'm thinking since the arsenal will in the most simple scenario have you add the weapon first (unless you use the "all mags" option before you add the weapon which sounds tedious and defeating the purpose of an UI like hte arsenal) this is bound to happen. so i'm thinking have a function run after the arsenal is closed that takes away all your weapons and reapplies them. i think though that this would probably not work for muzzles like GL. but probably will for rifles' main muzzle and launchers. Share this post Link to post Share on other sites
Tankbuster 1747 Posted February 11, 2017 I suspect you're right, bb. It sounds a lot like the mag before weapon thing. Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 11, 2017 3 hours ago, bad benson said: go play COD kid!1! I'm sorry, I must have missed on the joke entirely. TB asked how to reload weapons without animation, well that is what addWeaponItem does. The only thing about is that when mag is added to a launcher it will not be available to fire immediately but after normal reloading delay. [] spawn { removeAllWeapons player; player addWeapon "launch_B_Titan_short_F"; player addWeapon "arifle_MX_GL_ACO_F"; sleep 5; player addWeaponItem ["arifle_MX_GL_ACO_F", ["30Rnd_65x39_caseless_mag", 30, "arifle_MX_GL_ACO_F"]]; player addWeaponItem ["arifle_MX_GL_ACO_F", ["1Rnd_HE_Grenade_shell", 1, "GL_3GL_F"]]; player addWeaponItem ["launch_B_Titan_short_F", ["Titan_AT", 1, "launch_B_Titan_short_F"]]; } Share this post Link to post Share on other sites
bad benson 1733 Posted February 11, 2017 38 minutes ago, killzone_kid said: I'm sorry, I must have missed on the joke entirely. geez. it was about the first line of his post. thx for letting me explain my shitty joke and making it all as awkward as possible. thx alot! you would think adding some constructive input afterwards would be enough. sometimes i don't even... edit: also, this does instant reload for my launcher like i described. just tested it. works with pistols and rifles too. launcher gets put away but can be insta pulled up by selecting it again. rifles too, pistols go insta without that. actually not 100% sure causes it and when. no patience to test all scenarios. arma being arma. _sec = (secondaryWeapon player); player removeWeapon (secondaryWeapon player); player addweapon _sec 1 Share this post Link to post Share on other sites
Tankbuster 1747 Posted February 11, 2017 Bensons joke was directed at me, where I said I'm an uber-soldier. :) Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 11, 2017 2 hours ago, bad benson said: this does instant reload for my launcher I suppose you have to have backpack, right, in which you store ammo for the launcher? I don't think you can just give yourself loaded launcher if you don't have place where to put launcher ammo. With addWeaponItem you can. Same goes for having no uniform and rifle/pistol magazines I would imagine. Share this post Link to post Share on other sites
Tankbuster 1747 Posted February 11, 2017 Yes, I think that's the case. You must have a backpack capable of carrying 1 reload for the tube. Share this post Link to post Share on other sites
bad benson 1733 Posted February 11, 2017 yea in general i think so. do you mean like doing the whole thing scripted though? i was talking about right after getting stuff from the arsenal. when i ran my code after that, stuff was loaded when i selected it. but i just did a quick test. might've derped it. there is some weird engine thing at place where it selects a valid weapon for you or something. EDIT: actually, using selectweapon after my previous code works great. _sec = (secondaryWeapon player); player removeWeapon (secondaryWeapon player); player addweapon _sec; player selectWeapon (secondaryWeapon player); i'm thinking, this could be a great thing i might use automatically as a mod. run this for all weapons in a inventoryclosed EH. Share this post Link to post Share on other sites
Tankbuster 1747 Posted March 25, 2017 Apologies for not coming back, guys. A few issues cropped up that pushed this down the to do list a little. I'm going to try it very soon. Share this post Link to post Share on other sites
Tankbuster 1747 Posted March 25, 2017 Right, so there are some issues that make this more hassle than it's worth. KK's code that removes all the weapons, adds them back them forces a magazine into both muzzles does work, but in removing primary weapon from the player, it also takes away all his magazines for that weapon, including all the ones they've carefully put in the uniform, vest and backpack. It's a shame we cant just player addWeaponItem ["arifle_MX_GL_ACO_F", ["1Rnd_HE_Grenade_shell", 1, "GL_3GL_F"]]; on an inventoryclosed eventhandler. Running that in debug in the middle of the mission does nothing. Share this post Link to post Share on other sites