3. Understand the number and the range
Figure 3. Maximum sets the full amount; Preview Value chooses the sample shown in the designer.
| Setup | Result |
|---|---|
| Current 30, Maximum 100 | 30% full. |
| Current 3, Maximum 5 | 60% full. |
| Current 2, Maximum 3 | About 66.67% full; a percentage caption can show the decimals. |
| Current above Maximum | The displayed bar clamps to full. |
| Current below 0 | The displayed bar clamps to empty. |
The bar’s lower end is zero. Maximum must stay positive; this build enforces a small positive minimum. If a puzzle has five parts, Maximum 5 is usually clearer than converting every step to a percentage yourself.
Display clamping does not repair the source variable. In the runtime test, power = 150 displayed a full 100-point bar while the variable still contained 150. Clamp the number in the game logic too when later comparisons depend on it.
A meter is a display, not a slider. Clicking or dragging across it does not choose a new value. Use separate Buttons, actions or a Slider when the player needs to change the amount.
