• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Transferring tag to detached child?

shaggai

Well-known member
Trying to do something with the Wh40K WH files using the squad mechanic.

A Battle Sister Squad has a certain tag [ohTagA.ohAS] for testing whether a unit is a Sister of Battle Unit.

One of the options is the Rhino transport. To use the drag 'n drop, this option creates the Rhino unit as a detached squad.

Several options for the Rhino are dependent on the Sister of Battle Tag.

The question/problem is how do I get the [ohTag.ohAS] to transfer to the Rhino unit?

I've tried the following as the post-link (and pre-link) of the Rhino unit:

var result as number
var result1 as number

if (unit.tagis[ohTagA.ohAS] > 0) then
result = entity.assign[ohTags.ohAS]
result1 = entity.assign[ohTagA.ohAS]
endif

And it doesn't seem to work with the if statement as I written it. I've also tried to do several variations, entity, unit, squad, root and nothing seems to get it to trigger (or not trigger) as the case may be. (And I know that it's the if that the trouble since if I comment it out, the tags get transferred properly.)

The reason that I want it to work this way is that there are a few units which can take the Rhino transport, and if you drag it into a non-sister of battle unit - certain options to the rhino would be invalid and I want them to "disappear" as the case may be.
 
One of the things we have on our todo list for V3.2 is the notion of "squad tags". They would be like global tags, except that they are only "global" to the containing squad. When we add this capability, the situation you describe below will become easy to solve. However, in the meantime, you'll have to settle for a reasonable but less-than-optimal solution.

First of all, everything is currently self-contained within each top-level entity. Therefore, you CANNOT have one top-level unit within a squad assign a tag to a different top-level unit. The only tags that exist at the "squad" level are those that are accrued upwards from the units within the squad. So each top-level unit must be managed as an entirely independent thing.

Because of this limitation, you can't use the present of a tag on one unit to control what options are allowed on a separate unit. The only thing you can do is provide all of the options and use validation rules to complain if the user does something illegal.

What you might try is adding a "Sisters of Battle" option to the Rhino. This option then chains to the other options that are only available to SoBs, making them available when the primary option is selected by the user. The primary SoB option should also assign an accrued tag to indicate that an SoB Rhino has been added. You can then use that tag within a squad rule to verify that it's being used within a squad that contains proper SoB units instead of something invalid. I realize this approach isn't ideal, but it's pretty clean and simple both for the author and for the user.

Once we have "squad tags" later this year, you'll be able to implement this optimally....

-Rob


At 08:06 AM 2/24/2006, you wrote:

Trying to do something with the Wh40K WH files using the squad mechanic.

A Battle Sister Squad has a certain tag [ohTagA.ohAS] for testing whether a unit is a Sister of Battle Unit.

One of the options is the Rhino transport. To use the drag 'n drop, this option creates the Rhino unit as a detached squad.

Several options for the Rhino are dependent on the Sister of Battle Tag.

The question/problem is how do I get the [ohTag.ohAS] to transfer to the Rhino unit?

I've tried the following as the post-link (and pre-link) of the Rhino unit:

var result as number
var result1 as number

if (unit.tagis[ohTagA.ohAS] > 0) then
result = entity.assign[ohTags.ohAS]
result1 = entity.assign[ohTagA.ohAS]
endif

And it doesn't seem to work with the if statement as I written it. I've also tried to do several variations, entity, unit, squad, root and nothing seems to get it to trigger (or not trigger) as the case may be. (And I know that it's the if that the trouble since if I comment it out, the tags get transferred properly.)

The reason that I want it to work this way is that there are a few units which can take the Rhino transport, and if you drag it into a non-sister of battle unit - certain options to the rhino would be invalid and I want them to "disappear" as the case may be.
 
Back
Top