Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   Army Builder (http://forums.wolflair.com/forumdisplay.php?f=16)
-   -   Unit/Option cost issue. (http://forums.wolflair.com/showthread.php?t=6107)

Warmonger March 9th, 2006 07:26 AM

Unit/Option cost issue.
 
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?!!?

rob March 9th, 2006 10:29 AM

Unit/Option cost issue.
 
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:

Quote:

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?!!?

Warmonger March 9th, 2006 11:01 AM

Excellent. Problem solved.


All times are GMT -8. The time now is 04:45 PM.

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