Jump to content
Sign in to follow this  
SouthSaturnDelta

adding half filled magazines to units

Recommended Posts

Hi all,

I need to give a unit a clip which must not be full.

unit Addmagazine "m16" seems to be the sole method of adding clips, but this gives the unit 30 rounds where here I need to add less than that.

Any ideas how to work around this?

Many thanks,

SSD

Share this post


Link to post
Share on other sites

as far as I am aware you can't add partial magazines. If its for a mod, then perhaps consider creating half empty magazines instead.

Share this post


Link to post
Share on other sites

Yes,I considered creating mags with a certain count,but the permutations would be endless.

Surely there must b some kind of workaround.....

Share this post


Link to post
Share on other sites

you can only count how many rounds are left in a magazine for a weapon, but there's no way, that I know o,f to add a certain number back in.

the only viable solution I can think of is creating partially filled magazines... thats your work around.

Share this post


Link to post
Share on other sites

There may be a way that requires some scripting.

You would then need a script that does this:

1. SetPos unit far away from camera (so player won't hear unit shoot)

2. AddWeapon to unit .

3. AddMagazine to unit.

4. Use UseWeapon command to make the unit fire the weapon X times (i.e., if you want an AK mag with 12 rounds, then make the unit fire 18 rounds).

5. SetPos unit back to where he needs to be.

Depending on your needs, this should work for starting a unit with a partial magazine.

You could also have the unit drop the weapon, and use nearestObjects to get the handle of the weapon, and then setpos the weapon somewhere (on a table, near a dead guy, whatever).

Share this post


Link to post
Share on other sites

aye, not a bad way to go about if for AI, but for the player you're stuck (unless of course you want him to pick it up half loaded)

Share this post


Link to post
Share on other sites

have you tried pulling the slider in mission editor after you have clicked on the player soldier? the ammo slider? not sure if it works but you could try. smile_o.gif

Share this post


Link to post
Share on other sites

Commando84's way is the simplest way to do it.

it would aslo be easyer to make new weapon & ammo rather than mess around with scripts.

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  

×