Home   Help Search Login Register  

Author Topic: Total Units Count  (Read 614 times)

0 Members and 1 Guest are viewing this topic.

idleness

  • Guest
Total Units Count
« on: 16 Sep 2005, 08:22:28 »
Right now i'm doing this by grouping all my units in groups and using:

count units mygroup + count units nextgroup


i'm curious as to whether there is any way to use the ALL keyword to implement this instead. Thanks

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Total Units Count
« Reply #1 on: 16 Sep 2005, 09:38:03 »
hmmm, i've checked both my comrefs and i'm not seeing an 'ALL' keyword...

what you can do is make a trigger which covers the whole map which is triggered by one side, and in the on activation box put

Code: [Select]
number_of_loons = count thislist
untested, but i'm pretty sure that's the syntax. thislist will keep a dynamic record of how many units of that side are on the map. if you want to check for the beginning total, i.e. a static number, use '+thislist'.

idleness

  • Guest
Re:Total Units Count
« Reply #2 on: 16 Sep 2005, 10:06:24 »
WOW !!!!! IT WORKS!!!

Where do u get this stuff?? mind sending me URLs to ur comrefs?? =)

btw i was using this one with the 'ALL' thingy:

http://www.ofpec.com/publicfiles/files/tutorials/CMDREFv104.htm#AA

Thanks a bunch!!

i just realized tt if u set the activation to anybody, it returns the total number of units on the map. (even neutrals)

one other thing: just wat exactly is thislist
« Last Edit: 16 Sep 2005, 10:10:58 by idleness »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Total Units Count
« Reply #3 on: 16 Sep 2005, 10:09:39 »
for reference, our online comref can be found here.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Total Units Count
« Reply #4 on: 16 Sep 2005, 10:28:40 »
Quote
just wat exactly is thislist
It returns an array of the trigger contents..

So if you have units named like grunt01, grunt02 and grunt03 in the the trigger area (and the trigger set so that it will get triggered by one or all of those units) thisList in the trigger then returns [grunt01,grunt02,grunt03]..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Total Units Count
« Reply #5 on: 16 Sep 2005, 10:33:15 »
"All" is not a command.   It is part of the class tree used to define objects in the game, and can be used as an argument with certain commands, for example counttype.

That unofficial comref you were looking at can be extrememely useful and should be your second port of call after the link bedges posted.  However it is a bit old now.
Plenty of reviewed ArmA missions for you to play