• 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

Duplicating units with tag expressions?

osman

Member
I've got a bug that I've boiled down to a fairly simple case at this point. I have a simple unit, with three links. One link (priority 5, nature cost) is an upgrade option. The eval script looks like:
Code:
var result as number
result = unit.assign[myTags.SomeTag]

That option determines which one of two other options should be automatically selected. So I have two other links (priority 70, nature include), pointing to two different alternate options (option1 and option2).

One link has a live expression:
Code:
myTags.SomeTag
and the other has the opposite live expression
Code:
!myTags.SomeTag

This works perfectly whenever I create the unit and play with the upgrade option. My actual case is more complex, but it works perfectly. However, if I create an instance of this unit in my roster, select the upgrade option (so the tag is assigned), and then duplicate the squad, the new (copied) squad is in an incorrect state.

His upgrade option is selected (And 'show tags for unit' indicates that he has myTags.SomeTag assigned). He only has one of the two dependent options visible, but it isn't selected. It should be auto-selected, because of the include nature. If I do select it, I'm unable to de-select it (and at this point, the unit works correctly).

So I need to do something else to make sure that copied units are initialized correctly on the first eval pass? Or do they not even get a first eval pass?
 
This sounds like a bona fide bug in the way AB is duplicating a unit. I'm going to put it on the bug list.

-Rob


At 01:46 PM 12/4/2006, you wrote:

I've got a bug that I've boiled down to a fairly simple case at this point. I have a simple unit, with three links. One link (priority 5, nature cost) is an upgrade option. The eval script looks like:
Code:

var result as number
result = unit.assign[myTags.SomeTag]


That option determines which one of two other options should be automatically selected. So I have two other links (priority 70, nature include), pointing to two different alternate options (option1 and option2).

One link has a live expression:
Code:
myTags.SomeTag
and the other has the opposite live expression
Code:
!myTags.SomeTag


This works perfectly whenever I create the unit and play with the upgrade option. My actual case is more complex, but it works perfectly. However, if I create an instance of this unit in my roster, select the upgrade option (so the tag is assigned), and then duplicate the squad, the new (copied) squad is in an incorrect state.

His upgrade option is selected (And 'show tags for unit' indicates that he has myTags.SomeTag assigned). He only has one of the two dependent options visible, but it isn't selected. It should be auto-selected, because of the include nature. If I do select it, I'm unable to de-select it (and at this point, the unit works correctly).

So I need to do something else to make sure that copied units are initialized correctly on the first eval pass? Or do they not even get a first eval pass?
 
Back
Top