Home   Help Search Login Register  

Author Topic: need some help creating groups  (Read 681 times)

0 Members and 1 Guest are viewing this topic.

rgbman

  • Guest
need some help creating groups
« on: 08 Jan 2003, 01:20:25 »
Hey... newbie here.  I'm having some trouble creating and naming groups.

Here's what I've got so far.  If you guys could review and help me figure
out what I'm missing it would be hugely appreciated.

First, I created an Eastern Infantry group using the editor.  In the init
field for the Officer I entered the following:

EastAlpha SetGroupID ["Alpha", "GroupColor1"]

I then wrote a small script to count the units in the above group.  I run
this using the AddAction feature from the Player unit on the Western Side:

this AddAction ["Count enemies", "countenemies.sqs"]

The "countenemies.sqs" script looks like this:


; count alive eastern units
;
; EastAlpha is the group created from officers init field
enemyUnits = Units EastAlpha

; using the enemyUnits list, count them
enemiesAlive = EAST CountSide enemyUnits

; return the results to the player
Hint "Enemies Remaining: ", enemiesAlive

exit



Basically it doesn't work.  When the Action count enemies is taken it
always returns null "Enemies Remaining: ".  Anyone know what I'm missing?

-Rickster

rgbman

  • Guest
Re:need some help creating groups
« Reply #1 on: 08 Jan 2003, 04:20:24 »
hehe... I figured it out.  


rgbman

  • Guest
Re:need some help creating groups
« Reply #2 on: 15 Jan 2003, 01:30:27 »
Solved

Best to use the grp = Group unit format.

Example: grp1 = group this