• 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

Variable or overridden item costs

chrissuch

New member
Hi,

I am trying to figure something out that I am sure was possbile under v2.

I have a unit that costs 100 points. The unit can take between 1 and 3 of a particular item. The first item is factored into the unit cost (and effectively costs 0) but each additional one costs +10 points.

Now, I could set the cost of the item at 10ea and the cost of the unit at 90 (to account for the 'free' item) but I am not a huge fan of this.

How could I set it up so that the costs display to the user correctly? ie, item x 1 = 0 pts, item x 2 = 10 pts & item x 3 = 20 pts

Cheers, Chris.
 
In the item, click on the postlink button in the top right. Now, we'll enter a script there that will modify the cost of the item(s) as a whole by -10.

Code:
@single = maximum(@single-10,0)

so, the cost of all the items is modified by -10, and then the maximum statement makes sure that it's not charging -10 for the item if you haven't taken any.

If the range is 1-3, rather than 0-3, then you can leave the maximum portion out.

I apologize if I missed anything in the script, I'm working from memory.
 
Back
Top