Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 28th, 2008, 12:25 AM
I have a set of items I'm adding to my game system - some have variable costs. I have the code written to switch portals between a display for those with a fixed cost and an incrementer for those with a variable cost. The problem is that in one cast, the incrementer I need is 2, not 1 (the thing allows costs of 2, 4, or 6). I had already writtten a field (with defvalue="1") into this thing in order to allow the user to set a different increment when needed, but when I tried to set;

<incrementer
field="valCost"
interval="valInc"
</incrementer>

it gave me an error. For now, I'm going to write a second incrementer, with increment="2", and add an if/then to switch between them.
Mathias is offline   #1 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 20th, 2009, 11:47 PM
Your solution is correct. Each incrementer can be assigned an interval, but that value must be an explicit integer. That means you'll need two separate portals if you want one with an increment of one and another with an increment of two.

The other approach you might consider is to always use an increment of one and then setup the multiplier internally. For example, if you look at the Savage Worlds example files, they use a range of 2-6 with an increment of 1, then they multiply everything by 2 for final display. The user sees it as a range of 4-12 with an increment of 2, but it's actually tracked as a range of 2-6 internally.
rob is offline   #2 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:49 PM.


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