Junior Member
Join Date: Aug 2006
Posts: 1
|
I'm building an army list for Heavy Gear Blitz.
The basic army consists of a number of squads each with varied vehicles (i.e.: each squad contains several vehicles each of which may be different and have different skill levels and options). To this end I have started the army list with each vehicle as a child to a containing 'squad'. So far so good... However, some squad level options need to have an effect on the child unit (or units), for example: A PRDF General Purpose Gear Squadron has the following members and skills (skills are attack, defense, electronic warfare and leadership): * Chieftain command gear (Atk: 2, Def: 2, EW: 2, Ld: 2) * Warrior trooper gear (Atk: 2, Def: 2, EW: 2, Ld: 0) * Warrior trooper gear (Atk: 2, Def: 2, EW: 2, Ld: 0) * Warrior trooper gear (Atk: 2, Def: 2, EW: 2, Ld: 0) * Warrior trooper gear (Atk: 2, Def: 2, EW: 2, Ld: 0) The squadron has an options: 'Upgrade Chieftain to Chieftain IV' and 'upgrade to Veteran Squadron (Max of 1 Veteran Squadron per 1000 pts' (individual units have weapon upgrade options, etc as well) Upgrading the Chieftain simply requires a name change of the Chieftain to 'Chieftain IV' (no other alterations are needed) so I have made this an option on the Chieftain rather than the squad (evaluate script: unit.name="Chieftain IV") - this seems to work. Upgrading to Veteran status has the following effects: All units improve their attack skill to 3, and the command gear gains +1 to its leadership score. In the 'Veteran upgrade' case I am struggling to make the necesary alterations. Because of the scope of the 'upgrade' I have the option at the squadron level. I currently have the following code in the 'evaluate' part of the veteran option: child[unitrdf_ch].stat(atk) = 3 child[unitrdf_wa].stat(atk) = 3 .... child[unitrdf_ch].stat(ld) = child[unitrdf_ch].stat(ld) + 1 But this seems to have no effect! And variants thereof seem to also have no effect or else throw out errors! Have I missed something? Help! |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
This sounds like a timing problem. Please look carefully at the section entitled "Evaluation Sequence" within the "Critical Concepts" chapter of the Kit docs. In there, the exact sequence in which everything is evaluated is outlined. My guess is that your option is being evaluated at a later priority than the options which attach the child units.
Your approach will work for both of the things you're trying to do. However, you might find it better to use an alternate approach. 1. You could define a tag to indicate that the Chieftain is a Veteran. Have the option assign the tag to the Chieftain. Then have another option on the Chieftain base itself on a Live tag expression and perform the name change. The advantage of this approach is that it becomes easy to utilize the tag for validation rules later. For example, if only one Chieftain can be upgraded per X points. 2. You can use a similar approach for the child units. Have the option assign a tag to each of the child units, then have an option on the child units apply the stat adjustments. You can assign a tag to all children in a single line of script code by using the "children." transition. This makes it easy to apply varying adjustments to the children, since you only need to assign the tag once in the option and the child units themselves interpret the various tags and act on them. The key thing to be careful of when using the above techniques is the evaluation sequence. Make sure your priorities are set such that everything is evaluated in the order you require. Hope this helps, Rob At 04:15 AM 8/4/2006, you wrote: Quote:
|
|
#2 |
|
|