PDA

View Full Version : Ammo count



CSJ
Oct 14 2007, 02:06
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 = &#40;_vehicle ammo &#34;14Rnd_FFAR&#34;&#41;

player globalchat format&#91;&#34;%1&#34;, _ffarCount&#93;
[/QUOTE]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 = &#40;_vehicle ammo &#34;FFARLauncher&#34;&#41;

player globalchat format&#91;&#34;%1&#34;, _ffarCount&#93;
[/QUOTE]
both of which return a "0" value

Any ideas what is wrong ? http://forums.bistudio.com/oldsmileys/confused_o.gif

.kju [PvPscene]
Oct 14 2007, 06:51
AFAIK back in OFP is was impossible to read the amount count.
You could use the fireEH to count the shots yourself maybe.

Sickboy
Oct 14 2007, 09:07
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.

CSJ
Oct 14 2007, 12:00
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 = &#40;_vehicle ammo &#34;FFARLauncher&#34;&#41;

player globalchat format&#91;&#34;%1&#34;, _ffarCount&#93;
[/QUOTE]

UNN
Oct 14 2007, 17:46
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?

CSJ
Oct 15 2007, 07:34
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. http://forums.bistudio.com/oldsmileys/confused_o.gif