Home   Help Search Login Register  

Author Topic: Finding Magazines  (Read 2968 times)

0 Members and 1 Guest are viewing this topic.

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re: Finding Magazines
« Reply #15 on: 01 Jun 2008, 17:42:58 »
Exactly ;)

Offline six6six

  • Members
  • *
Re: Finding Magazines
« Reply #16 on: 04 Jun 2008, 13:27:35 »
How can I find out if a unit has no ammo via script?

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Finding Magazines
« Reply #17 on: 04 Jun 2008, 16:24:02 »
Read the OFP ComRef start to finish over and over again, even if you do not understand it all.
ammo
forEach
magazines
Code: [Select]
_magsleft = 0
{_magsleft = _magsleft + (_myUnit ammo _x)} forEach magazines _myUnit
Will have to test how this behaves when unit is in vehicle.
« Last Edit: 04 Jun 2008, 16:29:13 by Mr.Peanut »
urp!