• 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

Unit/Option cost issue.

Warmonger

Well-known member
Okay. I've glanced through the messages here and I also admit, I'm out of practice on coding AB.....

I have a unit, that when purchased as a unit costs 12 pts each.

I also have a way that another unit can buy a single instance of the previous unit, for 15 pts. I currently have it set where the option costs 3 pts and has a text cost of 15. When you buy the option, it purchases at the correct cost, but when it links the unit in, it shows a cost of 12. I need it to reflect the proper cost of 15, and I'm trying not to create a whole seperate unit just to have a higher cost....

help?!!?
 
You need to utilize the "ChildCost" script for the entity. It will only apply when the entity is taken as a child and otherwise be ignored.

If you need to use the unit in multiple places as a child, then you can use a tag on the PARENT unit to identify when the cost should be changed. Using a "unitid" tag would be quick and easy for this. Just remember that "ChildCost" is applied to the child, but it is given the PARENT for processing tags. Also, you need to use "base" tags that are pre-assigned to the parent and NOT dynamic tags that are added/deleted during evaluation.

Hope this helps,
Rob

At 08:26 AM 3/9/2006, you wrote:

Okay. I've glanced through the messages here and I also admit, I'm out of practice on coding AB.....

I have a unit, that when purchased as a unit costs 12 pts each.

I also have a way that another unit can buy a single instance of the previous unit, for 15 pts. I currently have it set where the option costs 3 pts and has a text cost of 15. When you buy the option, it purchases at the correct cost, but when it links the unit in, it shows a cost of 12. I need it to reflect the proper cost of 15, and I'm trying not to create a whole seperate unit just to have a higher cost....

help?!!?
 
Back
Top