LiminaliaLiminalia
How-to: Let players investigate spots on the background

Let players investigate spots on the background

Open in Claude (new tab)
On this page

For exploration scenes where the player looks around a room, use “Investigation.” You place clickable spots on the background; clicking one shows that spot’s scene (label) and then returns to the investigation screen. Once every required spot has been examined, the story moves on.

The examples on this page use the project you make in the tutorial, “Shiori of the Library.”

Make the spots

Spots are written in data/investigation.json. You can make them with a form in Studio.

  1. Click “Plugins” at the top of the screen, and choose “Investigation” under “Data” on the left (if the file doesn’t exist yet, click “Create”).
  2. Add a place to investigate with ”+ Add,” and enter its name (the name used from the scenario; library here), the scenario file where its scenes are written (start), and the label to go to once everything is examined (#done).
  3. Add a view and choose its background, then drag rectangles on the background to add clickable spots. For each spot, enter its heading, the description shown when the mouse is over it, and the label to show when it’s clicked.
The Investigation form. Two rectangles, the bookshelf and the window, are drawn on the library background.

Drag a rectangle to move it, and drag its lower-right corner to resize it.

Show it from the scenario

  1. Where you want the investigation screen to appear, find “Investigate” with the search and add it, then enter the place’s name in id.
  2. Below it, write a label and text for each spot, and the label to go to once everything is examined.
The "Investigation" line in the block view, with the labels for the bookshelf, the window and after everything is examined.

A spot’s scene returns to the investigation screen when it reaches the next label, without @return.

Check it by playing

Move the mouse over a spot on the background to see its description. Click it to go to its scene, which returns to the investigation screen when it ends. Examined spots are marked.

The investigation screen. The mouse is over the window, showing its description, "A window lit by the setting sun."
Spot itemWhat it sets
requiredTurn it off to make a spot the player can move on without examining
flagSets that variable to true once the spot is examined
ifShows the spot only when the expression is true
onceHides the spot once it has been examined

When there are two or more views, the player can switch between them with tabs. To have the player click “Finish” instead of moving on as soon as everything is examined, set the place’s finish to button. To let the player investigate again from the start, place “Reset spots” (@investigate-reset).

Pick a “Face” for a view to show it on its tab. A “First entry scene” plays a short scene the first time the player switches to that view. You can also set a “Revisit scene” for spots examined again, an “Unfinished target” for finishing before everything is examined, and an “Opening title” shown large the first time the place opens.

To let the player pick a destination on a map, make the map and its spots under “Map choices” on the same screen and place @map-choice. Pressing a spot shows its description, and “Choose this” picks it.

In code

@investigate library

# shelf
The bookshelf at the back holds a row of star atlases.

# window
Outside the window, the setting sun sinks behind the hill.

# done
I've looked around everywhere. Time to head home.

For details, see @investigate.

Commands used on this page

@investigate-reset@map-choice@investigate