Wire a tuner and a read-only gauge
PCA 3D ADVENTURE STUDIO
STUDIO 0.86.4.6 • LESSON 1 OF 4
A binding connects a control to a value. Give a player-operated tuner two-way communication and let a pressure gauge follow the machinery.
1. Give the tuner a numeric source
In a project copy, create a numeric game variable called frequency with a starting value of 96.0. In GUI Designer select a rotary control, open Type Settings and choose the FM tuner preset. Check the range 88–108 and the step 0.1. Applying a preset loads its instrument defaults.
2. Connect the tuner in the Inspector
Choose Bind primary value… (a bound control shows its current source). Set Source to game.variable, Source ID to frequency and Direction to two_way. Leave Convert at none and apply. In Runtime Preview, focus the tuner and nudge it one step to the right. The control and the variable should both show 96.1.
3. Compare it with the pressure gauge
Open Instrument-Room.pca3d from examples/workbenches. Under GUI instruments select pressure. Inspect its primary binding to the numeric variable pressure with direction one_way. Run the project and press Raise pressure. The gauge moves from 66 to 80. Try to move it back by turning the gauge.
Actual Studio instruments. The FM tuning scale and the pressure scale express different units.
WHAT TO CHECK
The pressure source should still be 80. If your own tuner snaps back after a turn, check for a one-way binding or a second writer resetting frequency. If it steps in whole units, check both the step and the source type.
Related original lesson | p. 37 Tutorial edition 0.86.4.7
