Home   Help Search Login Register  

Author Topic: Counting Ammo in cargo  (Read 529 times)

0 Members and 1 Guest are viewing this topic.

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Counting Ammo in cargo
« on: 15 Jan 2003, 18:31:58 »
Ok people.  I have a cessna, that I want to be loading up with Satchel Charges (just satchel charges).

I want it to count how many charges I have in the cargo and then it shows me the number.  I will be decreasing the number with a seperate part of the script.

_mags = magazines Plane1;
_i = 0;
#loop
_type = _mags select _i;
_count = Plane1 ammo _type;
titleText[format["There are %1 of %2", _count, _type], "PLAIN"];
_i = _i + 1;
? _i < count _mags : goto "loop";


You might have gathered that this doesnt work!  Why not?

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Counting Ammo in cargo
« Reply #1 on: 16 Jan 2003, 01:20:58 »
dere r 2 difrent Qs in here and i can answer only1  :-\

Quote
Why not?

cuz da magazines command returns only da magazines of da unit/vehicle if it have weapons (da magazines dat da unit/vehicle can shot) so cuz da cessna have nothin 2 shot its scatchel wid it dont return dem in magazines command  :-\

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Counting Ammo in cargo
« Reply #2 on: 22 Jan 2003, 00:40:08 »
Rough trans. from LSD'ish to Tombish :

 :D Wassup, hifly!!!! what'cha been eatin' lately man?!! them cessies won't let any scroll count mags fer crap
as long as ya ain't got no mags to frikkin count, lazzy!!!! Try & create a custom weapon outta the satchels
and addWeapon/addMagazine the stuff to yer planes.... then ya can count 'em!  ;D

Or 'setAmmoCargo' to a minimum (i.e. only 1 satchel) and use a looped AddMagazineCargo-banana.
( ::) that is if ya can count ammoCargo at all, which brings us back to yer orig. Q  ::) )


;D