Help the room remember
TUTORIAL 03 • VISUAL SCRIPT DESIGNER
A variable is a piece of information the game can keep. This one answers a yes-or-no question. Has Bea fixed the washer? One little graph gives the right answer every time she enters.
1 Under Variables, add washer_fixed. Choose type Boolean and leave Initial Boolean Value unchecked (false). Apply. Under Visual Scripts, add washer_view, named Washer view. Start with an empty graph. Delete any starter nodes so If Variable is the first node you add.
2 Drag If Variable from the palette, or use Add Node. Set Variable = Washer fixed and Equals = True. Add the five action nodes listed below. On every object node choose Sorting Room first, then the object. Each Hide / Unhide Object node has a Visible checkbox.
In the Visual Script Designer the purple condition splits into two wires. Drag from an output dot to the next input dot.
| Wire | Nodes to connect in this order |
|---|---|
| TRUE • fixed | Hide / Unhide Object › washer_lock › Visible off |
| then | Hide / Unhide Object › washer_running › Visible on |
| then | Enable / Disable Object › washer_running › Enabled on |
| FALSE • locked | Hide / Unhide Object › washer_lock › Visible on |
| then | Hide / Unhide Object › washer_running › Visible off |
3 Open Scenes › Sorting Room. In Room Events › When Enters Room, choose Run Script and select Washer view. Apply and save. Use the ordinary enter event so the room checks again on return trips. A fresh game should still show the locked washer.
PCA 3D Adventure Studio / 12
