Skip to reading
The Sock Exchange, Part 4: Trouble After Closing

Wire up the yard switch

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 04 • SCENE + VISUAL SCRIPT DESIGNERS

One switch action can serve two kinds of player. A click on Use and a typed “use lamp switch” will both call the same visual script.

1 Draw a 32 × 44 transparent sign with the letters SW and a narrow post. Import as Image switch_box. Drag it beside the tag. Name it Yard switch, ID switch_plate. Use position [10, 0, 0.95], source size 160 × 220 and the same billboard settings as the tag. Give it the synonyms switch and lamp switch. Apply.

2 In Visual Scripts create yard_switch. Start with an empty graph and add one Toggle Light node. Choose Service Yard, then Inspection lamp (yard_lamp). Save. On the switch’s hotspot choose default verb Use. Under Verb Actions › Use, choose Run Script › yard_switch. Apply and save the project.

Place the switch on the canvas beside the tag. Leave a little space between their artwork so the player can pick either one.

Light off • the top of the post and the pad go dark.  Light on • the post picks up a warm highlight and throws
                                                a shadow.

Check your screen With the Part 3 controls, click Use, then the switch. The illuminated patch should disappear. Click Use and the switch again to bring it back. The flickering puddle on page 8 is independent of this lamp.

PCA 3D Adventure Studio / 11

Page 11 of 20Permalink
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