Skip to reading
The Sock Exchange, Part 5: The Midnight Pickup

Connect each button to its chute

Edition 0.86.4.2

0.86.4.2 edition with appended native sprite-motion lessons. Earlier chapters, reference counts and screenshots retain their original edition context.

Download PDFView illustrations

TUTORIAL 05 • VISUAL SCRIPT + GUI DESIGNERS

There are three small visual graphs. Each has a single node. The only difference between them is the word it sends to the sorter.

1 Under Visual Scripts, add a graph named Press sheets, ID bin_sheets. Remove any starter node. Use Add Node or the palette to add Call Script Function. In its function picker choose Press sorter bin from Sorter logic. Under bin_name (string) type sheets, lowercase, without quotes. Leave Expression off and Result Variable empty. Save. A one-node graph needs no wire.

2 Create Press socks and Press towels the same way, or duplicate the first graph and change both its ID and its word. Use the exact pairings below. Apply and save each graph.

Source table from Connect each button to its chute, page 16
GUI buttonClick behaviorClick Target (graph ID)bin_name in graph
Sheetsrun-visual-scriptbin_sheetssheets
Socksrun-visual-scriptbin_sockssocks
Towelsrun-visual-scriptbin_towelstowels

Inside the Sheets button • Click runs bin_sheets. Scroll past Hover to reach these fields.

Inside Press socks • its node passes the literal word socks to the function.

3 Back in GUI Designer › Night sorter, click each button on the canvas, open Events, scroll to Click, choose run-visual-script and type the matching Click Target. Save. The button calls the graph, the graph supplies the word, and the function checks it.

PCA 3D Adventure Studio / 16

Page 16 of 19Permalink
Go to page

Continue your 2D adventure

  1. Part 1The Sock Exchange, Part 1: Your First 2D Adventure
  2. Part 2The Sock Exchange, Part 2: The Missing Laundry
  3. Part 3The Sock Exchange, Part 3: The Dryer Conspiracy
  4. Part 4The Sock Exchange, Part 4: Trouble After Closing
  5. Part 5The Sock Exchange, Part 5: The Midnight Pickup
  6. Part 6The Sock Exchange, Part 6: Closing Time