Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
harkan
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Posts: 345

Old February 9th, 2006, 03:09 AM
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??
harkan is offline   #1 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old February 11th, 2006, 04:28 PM
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:
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??
rob is offline   #2 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:41 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.