Junior Member
Join Date: Jun 2014
Posts: 2
|
Hello!
Working away on the new book for Warmachine. I'm trying to write a rule that is scoped to unit and limited to that unit's id. The model count for that unit needs to be limited to the number of warjacks in the roster +1. I thought this would work, but it's not picking up the tagcount...any suggestions? var jacks as number jacks = (roster.tagcount[cmpgrp.warjack]) + 1 if (count[model] <= jacks) then @valid = 1 endif Thanks! |
#1 |
Senior Member
Volunteer Data File Author
Join Date: Apr 2005
Posts: 220
|
Ok, been away from the board for a while and couldn't remember my password...got that sorted out.
But, yeah. Can't figure out what's up with that script. I thought I could get to the roster.tagcount from within a unit scope rule? Anywho...working on the Cryx units in Vengeance tonight...thanks! The Butcher Warmachine/Hordes ('Retired' Confrontation and AT-43) Army Builder Author. Magic the Gathering Card Vault Author. |
#2 |
Senior Member
Volunteer Data File Author
|
Welcome back thebutcher. Glad to see you haven't disappeared permanently.
The only "hobby" GW is interested in is lining their pockets with your money. |
#3 |
Senior Member
Join Date: May 2012
Posts: 206
|
Is the tag group cmpgrp.warjack global or accrued?
My own Warlord Games gallery and the home of the Warlord Games datafiles: http://www.facebook.com/ABDataFileWarlordGames |
#4 |
Senior Member
Volunteer Data File Author
Join Date: Apr 2005
Posts: 220
|
It is Accrued.
Warmachine/Hordes ('Retired' Confrontation and AT-43) Army Builder Author. Magic the Gathering Card Vault Author. |
#5 |
Senior Member
Join Date: May 2012
Posts: 206
|
Odd ... have you tried putting that script into the Postlink section of the unit but changing the unit name to the tagcount (and stating the obvious sorry - removing the @valid=1 bit
That should at least give you an idea of what is being returned on the tagcount and may give you an indication where the fault lies. I've had a similar issue in the past where it was the tag not being properly assigned - it took a while but using the "Show all tags for unit" helped as well The other obvious (sorry again!!) thing to ask is are there any Jacks in the roster you are using to test and how do they have tags assigned - are they scripted to add to the Jacks or are they "native" in the unit build in ABCreator?? My own Warlord Games gallery and the home of the Warlord Games datafiles: http://www.facebook.com/ABDataFileWarlordGames |
#6 |
Senior Member
Volunteer Data File Author
Join Date: Apr 2005
Posts: 220
|
Got it!
I switched the focus from roster.tagcount[cmpgrp.warjack] to overall.tagcount[cmpgrp.warjack] And it works like a charm! Thanks for the help out, Harkan! Butcher Warmachine/Hordes ('Retired' Confrontation and AT-43) Army Builder Author. Magic the Gathering Card Vault Author. |
#7 |
|
|