Skip to reading
First Light, Part 3: Behind the Wall

Fit the sleeve over the winding key

Edition 0.86.3.4

Part 3 of the First Light course. Add the Relay Room, combine a key and sleeve, create a staged quest, use visual scripting for the typewriter and check cutscene-skip behavior.

Download PDFView illustrations

08 / THE COMBINATION

1. Create the recipe. Add another GDScript. Use fit_key for Script ID and Fit the Key for Name. Paste this block, validate, apply and save. A count of one is the default for these inventory actions.

Code example
func run():
Code example
    if not HasInventory("brass_sleeve") or not HasInventory("new_item"):
Code example
        return
Code example
    await RemoveInventory({"itemId": "brass_sleeve"})
Code example
    await RemoveInventory({"itemId": "new_item"})
Code example
    await AddInventory({"itemId": "long_key"})
Code example
    await CompleteObjective({"questId": "behind_wall", "objectiveId": "fit_sleeve"})
Code example
    await ShowMessage({"text": "The sleeve clicks into place. The key now reaches twice as far."})

The guard at the top checks for both ingredients before spending either one. Then the script takes the two pieces, gives back one Long Key and checks off fit_sleeve in the journal.

2. Tell PCA which items go together. Open Inventory › Brass Sleeve › Inventory Actions. Click Add Inventory Interaction. In Allowed Targets, select the inventory item Winding Key. The stored selection can read inventory:new_item. Under Result Action — Step 1, choose Run Visual Script / Run Script and select Fit the Key. Apply and save. One rule works in either order.

[1] The target is an item inside inventory. [2] Fit the Key runs when the two items meet.

Try it in inventory. With both pieces collected, click Walk on the game’s bottom bar, then press I. Click Brass Sleeve and then Winding Key. If the panel closes after selection, reopen it to click the other item. You should have one Long Key. Press J to see “Find what is knocking.”

Inside Pip’s inventory, Winding Key [1] and Brass Sleeve [2] are separate items until you combine them.

Page 9 of 13Permalink
Go to page

Continue your 3D adventure

  1. Part 1First Light, Part 1: Your First 3D Adventure
  2. Part 2First Light, Part 2: Three Knocks
  3. Part 3First Light, Part 3: Behind the Wall
  4. Part 4First Light, Part 4: The Message in the Machine
  5. Part 5First Light, Part 5: The Clockmaker’s Secret
  6. Part 6First Light, Part 6: The Final Hour