Jump to content
beno_83au

setAmmo on Grenadle Launcher Attachements

Recommended Posts

Hi, a problem spawned of another problem. But thankfully the originator is coming along alright haha.

 

Using setAmmo on a weapon does what it does, but how would I set the ammo for an attached grenade launcher. I'm forecasting for when someone is using the 3GL rounds in a MX and am required to set a player's 3GL ammo to something less than 3 rounds. Is there a way to get this to happen?

Share this post


Link to post
Share on other sites

One time, I was trying to create a Great War scenario. There are no bolt action rifles, so my solution was to give each magazine one round. That means after each round, the soldier has to reload, a bit like a bolt action rifle.

 

This might be useful to you and your GL magazines:

 

The classic command gives six magazines each of 30 rounds

{this addMagazine "30Rnd_556x45_Stanag"} forEach [1,2,3,4,5,6]; 


This command gives 6 magazines each of 15 rounds

{this addmagazine ["30Rnd_556x45_Stanag", 15]} forEach [1,2,3,4,5,6];


This command gives 6 magazines each of 1 round

{this addmagazine ["30Rnd_556x45_Stanag", 1]} forEach [1,2,3,4,5,6]; 

.

 

 

 

Share this post


Link to post
Share on other sites

@gc8 It works on the player but it doesn't set the ammo for magazines, only the total ammo on the player compared to a full state.
 

@sarogahtyp @Joe98 That does add mags into the player's inventory with the right ammo, but not the weapon.

 

However, I think I have found a solution through the LoadMagazine action. All I need to do is match a magazine in the inventory that has the expected amount of ammo. So I'll just add a partial magazine to the inventory then force the reload with that mag. Off I go.....

 

Thanks.

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

×