Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   Army Builder (http://forums.wolflair.com/forumdisplay.php?f=16)
-   -   override question (http://forums.wolflair.com/showthread.php?t=7113)

stubbdog August 29th, 2007 12:20 PM

override question
Can an override be figured at the time of model choice?

That is, I have a model that would have a nested override:

if roster.faction then
model is can be either a soldier and/or a solo. But, as a solo it costs 15 more points.

The first part of that equation is easy, just throw in:

<override index="0" group="type" empty="yes">
<tagover id="Tgrunt"/>
<tagover id="Ssolo"/>

But, I am not sure how to pull off the second part. The 15 point penalty only applies to the solo, not to the soldier (or whatever the model happensto hae been before). So, I cant just say:

<condition>type.Ssolo</condition> cause by definition of the override, that would be true no matter if it were fielded as a solo or not.

Anyone have a suggestion, other than simply creating a second datacard to handle them individually?

Mathias August 29th, 2007 11:08 PM

Actually, overrides aren't where you want to be looking for this functionality. What you want is an option. At first glance, what you want to do is code in an Eval script.

First, here's something from the manual on how to check if you're a top-level unit (which would be the case for solos or leaders, but not models added to a leader)

if (entity.tagis[runtime.child] = 0) then
~apply effects

So, if the unit is a solo, then you remove the Tgrunt tag, add the Ssolo tag, and add 15 to the cost. Or, vice-versa if you want the higher cost to be what shows up on the unit s\election window.

If you want the option to display whether the unit is a solo or troop, you can alter the option's name in the script, so that it is named "Grunt" when the model is a grunt, and "Solo" when it's a solo. On the other hand, you could simply have the option hidden at all times to keep it from cluttering everything up.

stubbdog August 30th, 2007 10:01 AM

Sounds like a plan. I will definetly try that.


one of my weaknesses is that I am not really a programmer and I kinda fumble my way along. Do, I put it just like you have it there:

(entity.tagis[runtime.child] = 0)

or do I need to be swapping out variable names or something?

That and I figure the adding the 15 points to the cost is simply going to be some sort of equation of x = x + 15

Mathias August 30th, 2007 06:14 PM

I just cut and pasted the if/then from the manual. Didn't try it yet myself, but it looks complete.

Here's what's supposed to happen: transfer to the entity context (the entity that contains the option this is on), then, ask the question; does it have the tag runtime.child? (is this a child unit?) If no (=0) then run everything inside the if statement.

The cost will be in a cost script. Use the same if/then statement, and inside;
@single = 15

All times are GMT -8. The time now is 02:58 AM.

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