Jump to content
Sign in to follow this  
csj

Ammo count

Recommended Posts

I am trying to count the amount of 70mm rockets I have remaining on vehicle which is using Bi standard "FFARLauncher" and "14Rnd_FFAR"

I have tried

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_vehicle = _this select 0

_ffarCount = (_vehicle ammo "14Rnd_FFAR")

player globalchat format["%1", _ffarCount]

and<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_vehicle = _this select 0

_ffarCount = (_vehicle ammo "FFARLauncher")

player globalchat format["%1", _ffarCount]

both of which return a "0" value

Any ideas what is wrong ? confused_o.gif

Share this post


Link to post
Share on other sites

AFAIK back in OFP is was impossible to read the amount count.

You could use the fireEH to count the shots yourself maybe.

Share this post


Link to post
Share on other sites

Ammo works just fine, just only for the currently loaded and selected weapon, and returns the ammo count of the current magazine, not of the whole.

Share this post


Link to post
Share on other sites

If I copy and paste all selections to a plane model then it works fine

but I can not get it to work with the helicopters.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_vehicle = _this select 0

_ffarCount = (_vehicle ammo "FFARLauncher")

player globalchat format["%1", _ffarCount]

Share this post


Link to post
Share on other sites

With the Rapiers I had to define magazines with one round each. That way I could count the mags instead of ammo. Not sure it will work in this case. I guess it depends on the minimum reload time and other practicalities?

Share this post


Link to post
Share on other sites

Thanks UNN, I may have to go that way.

I have noticed that all BIS choppers have rocket launchers with enclosed tubes and no animation. Maybe my problem goes deeper. confused_o.gif

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  

×