Wire up the yard switch
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
