Show Pip what Kit just switched on
10 / SCRIPT 2 OF 5
1. Script ID: relay_sync. Name it Relay Sync. Think of it as the room’s setup list. Each time Pip enters, it checks the shared stage, shows the right pieces, and puts the pin back in its socket if she has already fixed it.
func run(): var stage = int(Runtime.variables.get("lift_stage", 0)) for id in ["relay_box", "link_pin"]: await SetObjectVisible({"entityId": id, "visible": stage > 0}) await SetObjectVisible({"entityId": "arc", "visible": stage == 1 or stage == 2}) await SetObjectVisible({"entityId": "lift_gate", "visible": stage < 4}) await SetObjectVisible({"entityId": "nell", "visible": stage == 4}) if stage >= 3: await AttachPoints({"entityId": "link_pin", "point": "tip", "targetId": "relay_box", "targetPoint": "socket"}) if stage == 1 and ActivePlayer() == "new_character": await SetVariable({"name": "lift_stage", "value": 2}) await ActivateCamera({"cameraId": "socket_cam", "duration": 0.7}) await ShowMessage({"text": "Pip: The cover is open. There's the empty socket."}) await ActivateCamera({"cameraId": "main_camera", "duration": 0.5})2. Run it on every entry. Select the Relay Room record itself in the database. Open Room Events. Under When Enters Room — Step 1, choose Run Visual Script › Relay Sync. Use the ordinary entry event. “First Time” would already be spent when Pip first comes through the hatch. Apply and save.
[1] When Enters Room runs on the return trip. [2] Relay Sync reads the shared stage.
Why change 1 to 2 before moving the camera? Stage 1 means the reveal is still owed. Setting 2 spends that reveal once. The 0.7-second blend draws Pip’s eye to the socket. The 0.5-second return gives the player the normal room view for the repair.
