Jump to content
Sign in to follow this  
iceman77

Is it possible to add a magazine directly into a weapon ...

Recommended Posts

... without going through the reload animation and the magazine initially taking up container space? I've a script that simply adds the magazine, but if the players inventory is full, then it doesn't (shouldn't) work as intended. Is it possible to load a magazine directly into a weapon?

Edited by Iceman77

Share this post


Link to post
Share on other sites

I thought that adding the magazines and then the weapon did the trick? Evidently I'm missing something here...

Share this post


Link to post
Share on other sites

I need to add the magazine directly into the weapon. If there is no room in the inventory then the magazine will not get added... It's for a dialog. I don't really wish to go into redundant details of why I need to do this. I would just like to and I would like to know if it's possible.

Share this post


Link to post
Share on other sites

always set the first mag to fill the gun with teh below, then add the rest

_caller setAmmo [primaryweapon player, 100]; - set amount to a 100 and that will cover all ammo capacity - delete the spare mag somehow or let it drop off.

sorry this is from the top of my head - remember issues with it in the database system i wrote - cant recall how else i fixed it at mo - will get back to you if ive got a better solution

Share this post


Link to post
Share on other sites

Well, this is only one of the minor problems in the whole equipement management in A3. For scripters like us, there is no other way but first add a clip to some container (uniform,vest,backpack) and then add weapon. First clip will be inserted into the weapon "magically". If in your case you have soldier already full of equipement, there simply will be no free space even for a small clip anymore and whole procedure fails. In such case, you just need to temporarily remove something to make room and then do the procedure again. If you also have the weapon, that needs to be removed, too. Otherwise there wouldn't be a clip before weapon. What i have seen in A3's built in gear menu (yeah read through a lot of code in pbo's), there might be something written in the engine for gear management but is not (yet) exposed to the scripters.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×