Solution requires a carried item to be applied to another item or world object; the right combination must be discovered.
The inventory is a spatial puzzle (attaché case): shaped items must be packed into the grid, and the last one only fits once rotated upright.
A use-item-on-thing puzzle is a verb-object interaction with a required_item field. The combination check is the same table lookup, plus an inventory test.
Extend the interaction record with required_item. The puzzle is declared as data: this item, on this object, produces this result.
class_name UsePuzzle extends Resource
@export var item_id: String
@export var target: String
@export var consumes := true
@export var sets_flag: StringThe match needs the item in inventory. Found in the carried list plus a matching target equals a solved combination.
func use_on(item_id, target):
if not inventory.has(item_id): return false
var p = find_puzzle(item_id, target)
return p != nullOn a hit, optionally consume the item and set the flag — opening downstream gates exactly like key_lock, but discovery-driven.
if p.consumes: inventory.erase(item_id)
flags[p.sets_flag] = trueIn short: Interaction table entry with required_item field; on match: consume_item() and set_flag()
14 catalogued game(s) use this mechanic, spanning 1989–2000.
▶ Explore Inventory Puzzle interactively — see every game + the Godot system