Use a turn, a press or a dialed digit
Build rotary instruments
STUDIO 0.86.4.6 / 0.86.4.7 • LESSON 7 OF 35
Choose the point in the interaction when the game should act. A tuner needs a stream of values. A rotary telephone needs one digit when a stroke finishes.
1. Keep feedback separate from the result
In GUI Designer choose your instrument and its event settings. Keep the ordinary hover and press feedback you use elsewhere in the GUI. Use Turn for a changing value. For a multi-hand control, the event supplies value, handleId and handleIndex. Choose handleId when the action belongs to a particular hand.
2. Complete a phone stroke
In Rotary-Workbench.pca3d, drag the finger hole for 4 around to the fixed stop and release. Listen or watch for the action assigned to Dialed. Repeat but release short of the stop. The wheel should return without submitting a digit. For keyboard or gamepad, focus the dial, choose a hole with Left/Right, then press and release Accept.
3. Call your script once
For the chosen GUI event, select Run Script for a whole script or Call Script Function for an exposed function. In a function argument choose Expression to pass the appropriate event field. Additional Event Actions run after the primary action in list order. Put a confirmation sound after the committed digit action.
The same phone at rest and at its stop, alongside a clock with selectable hands.
WHAT TO CHECK
Try dialing 4, 0, 1. A three-digit puzzle should receive three committed digits. If you also count the wheel moving back to rest, inspect whether the puzzle listens to Turn instead of Dialed.
