Skip to reading
The GUI Designer

Connect a meter to a number

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations
GUI DESIGNER                                                                                    0.86.4.1  /  HOTFIX 1

EDITION UPDATE

Give the meter a single source of truth. If oxygen changes during play, the bar can follow the number without a separate action to redraw it.

The link beside Preview Value opens this form. Here a one-way binding displays the numeric game variable oxygen.

01. Set up the source

In Variable Designer, create a numeric variable with ID oxygen and initial value 75. In GUI Designer, select a Progress Bar and set its range to 0–100. Clear its older progress-variable field before binding the same value.

02. Link the display

Click the link beside Preview Value. Set Source to game.variable, Source ID to oxygen, Direction to one_way, and Convert to none. Apply. In play, change oxygen to 25 using a game action. The bar should fall to a quarter.

03. Give the number a readable caption

On a label, use the link beside Text, select the same source, choose format, and enter Oxygen: {value}%. If the number is already on a 0–100 scale, the literal percent sign is enough.

IF A CHECKED ACTION RETURNS BOUND_PROPERTY

Change oxygen at its source. To return the bar to direct control, open its link, select the blank Source and apply.

PCA 3D ADVENTURE STUDIO                                                                           GUI Designer   /   56
Page 56 of 57Permalink
Go to page