7. Bind the bar to a Number variable
A variable is a better source for power, health, a timer or a puzzle counter. It gives the game one number to save, compare and display. The current typed Progress Bar inspector has no dedicated Variable picker, so this part uses Raw JSON.
1. In the Variable Designer, create a Number variable named Machine Power with ID power and a default of 0.
2. Select power_bar and open Raw JSON (Advanced). Use the tab arrows if it is off-screen.
3. Keep the existing element object. Add "variable": "power" as another property, with a comma separating it from the preceding property.
4. Use "value": 0 for the initial fallback and keep "previewValue": 60 for the designer sample.
5. Click Validate and Apply Element JSON (Advanced), then Save Project.
Figure 8. The variable property points to power. Keep the rest of the element JSON when making this edit.
Do not replace the entire element with a one-line fragment. Its ID, type, layout and style must remain. JSON uses double quotes, commas between properties and no trailing comma after the final property.
