Home   Help Search Login Register  

Author Topic: (count units group == 0) too damn slow  (Read 1208 times)

0 Members and 1 Guest are viewing this topic.

ThEoNeAnDoNlY

  • Guest
(count units group == 0) too damn slow
« on: 31 Dec 2004, 00:24:07 »

when i put (count units group == 0) into a trigger it takes ages before the trigger actually gets...triggerd

i knwo that there is something to add to stop this time lapse but im nto sure what it is

could someone please kindly enlighten me? :)

Guy

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:(count units group == 0) too d**n slow
« Reply #1 on: 31 Dec 2004, 00:34:18 »
? "alive _x" count units grp == 0

Try that.

:beat: *Gets Shot* :beat:

ThEoNeAnDoNlY

  • Guest
Re:(count units group == 0) too d**n slow
« Reply #2 on: 31 Dec 2004, 00:41:42 »
ok but what does the _X bit represent?

hmm off getting a voice in my head tellin me it means everyone in he squad right?

Guy

ThEoNeAnDoNlY

  • Guest
Re:(count units group == 0) too d**n slow
« Reply #3 on: 31 Dec 2004, 00:41:59 »
sorry, imean it is the name for the squad

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:(count units group == 0) too d**n slow
« Reply #4 on: 31 Dec 2004, 00:50:38 »
It's like a loop, it checks each group member in turn.

_x is used to represent them one at a time.........sort of.


Planck
I know a little about a lot, and a lot about a little.

ThEoNeAnDoNlY

  • Guest
Re:(count units group == 0) too d**n slow
« Reply #5 on: 31 Dec 2004, 00:58:18 »
yep it works a treat m8, now please explain to me, what made the difference?

Guy

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:(count units group == 0) too d**n slow
« Reply #6 on: 31 Dec 2004, 01:05:11 »
"alive _x" specifies that it should only look for living members of the group
since units don't immediately get removed from the group, there is a delay with the other count that doesn't have that.
_x is a variable that takes on the value of each item in an array, in this case, the units of a group.
so if a unit in the group is not alive, it won't get counted.

hope that clears it up for ya