Senior Member
Volunteer Data File Author
Join Date: Mar 2005
Posts: 345
|
Is there an easy way to add a tag that holds a value, i.e. chTrack.chCount5 or chTrack.chCount10, depednant upon the number on the squad instead of having to have a procedure that goes something like:
if (count[model] = 1) then retval = unit.assign[chTrack.chCount1) endif .... if (count[model] = 5) then retval = unit.assign[chTrack.chCount5) endif etc etc For a small unit it is no great prob, but for the Chosen this can go up to 20+. The current solution adds a tag for each member but again I would prefer to not to have that many tags. Something like: retval = unit.assign[chTrack.chCount*] where the * could be the model count?? |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
There is no way to do this using tags. However, the equivalent handling is automatically done for you whenever you use unit stats. For every unit stat, an appropriate tag group is defined, and a separate tag for each value of the stat is automatically generated on the fly by AB. When the stat value changes, the corresponding tag is changed. This means that whenever you set the stat value, a tag with the corresponding value is always present for the unit.
So the trick below is to define a private unit stat with the model count in it. You can then access the automatically maintained tag within the unit to perform tag expression tests on the value. This ought to yield exactly what you're looking for with a lot less hassle. Hope this helps, Rob At 04:09 AM 2/9/2006, you wrote: Quote:
|
|
#2 |
|
|