• 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

[ABC] Cost of an option expressed as a percentage

Brisco

Member
I would like that an option have as a price, 50% of the total price of the unit to which it is assigned. Thus with the price of various the option added. How can I proceeded in ABCréator? I tested this script in the "cost" script of the option but without success:

@single=(parent.unit.cost[total]*50)/100 I am not a pro in script :D
 
Given your description and the script you used, it looks like you have an objective that can never be achieved. If the option costs 50% of the unit cost and the cost of that option needs to be added into the total, then the total would always be increasing as well. So clearly the exact requirements of the game system are slightly different. Please tell me exactly how the rules state the option needs to work, then I can recommend a solution.

I also recommend you take a look at the section entitled "Custom Cost Calculations" within the Tips & Tricks chapter of the Kit documentation. You might find what you need there. If not, give me the info asked for above and I'll outline who to do it.

-Rob


At 09:49 AM 1/14/2007, you wrote:

I would like that an option have as a price, 50% of the total price of the unit to which it is assigned. Thus with the price of various the option added. How can I proceeded in ABCréator? I tested this script in the "cost" script of the option but without success:

@single=(parent.unit.cost[total]*50)/100 I am not a pro in script
icon_biggrin.gif
 
IT acts of the option teleportation of the terminators of 40k in v2 the cost of teleportation is equal to 50% of the total cost of squad.

I found a solution by creating UnitStat which takes again the price of squad and to which I add the price of each option taken then I add a script has the teleportation which indicates that this cost is divided by two.

Sorry for my English, I use an automatic translator. :)
 
Ah, then the use of an entity PostLinks script or a Cost script similar to the one outlined in the documentation topic I cited would be the easiest solutions. However, the approach you used will also work. The only problem with the unit stat approach is that any new options have to remember to add themselves to the stat, whereas the alternate two approaches listed above avoid this consideration.

-Rob

At 11:30 PM 1/15/2007, you wrote:

IT acts of the option teleportation of the terminators of 40k in v2 the cost of teleportation is equal to 50% of the total cost of squad.

I found a solution by creating UnitStat which takes again the price of squad and to which I add the price of each option taken then I add a script has the teleportation which indicates that this cost is divided by two.

Sorry for my English, I use an automatic translator.
icon_smile.gif
 
Back
Top