# Thread: Maximum Value?

1. ## Maximum Value?

Hi. Another math question. I don't know the name for this method so bare with me. So I have a maximum value of 999. A player can increase the value by 25%, 50%, 75% or 100% until it reaches 999. How do I make it so when the value is 500, 50% won't make it go over for example by reducing the amount 50% can generate?

2. Min(val1,val2) "returns the minimal value of the two given values".

You can access it via Special Object -> Calculations -> Minimal of Two Values.

If one of the values is 999 and the other is your calculation, then it will usually go with your calculated number (which will be the lowest), except where your calculated number is over 999 (in which case it will go with 999 as that will be the lowest).

Alternatively, if you are using a Counter object then you can set its "Maximum Value" under Properties-> Settings.

3. I thought that would do what I needed, but it doesn't. If we had 1000 as the max for example and were at 0, I needed 25% to generate 250, 50% to generate 500, 75% to generate 750 and 100% to generate 1000. If your value was 500 instead of 0, I needed it 25% to generate 125, 50% to generate 250, 75% to generate 375 and 100% to generate 500.

4. (Max-Min)*Percent

In your example this would be

(1000 - 500) * 0.25 for 25% and would give you 125

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•