Skip to content

Obstacle_puzzle

Jan Sandström edited this page Apr 28, 2020 · 1 revision

Obstacle_puzzles are components which require a solution to progress without the need for a specific item.

Puzzles behave a lot like and share a number of properties with obstacles .

Typically the reward is a locked door being opened or a chest becomes accessible.

The only puzzle type at the moment is a hidden-button type where a button hidden under a port or a block must be traversed.

Puzzles do not require the treasure_obstacle or treasure_open tiles other obstacles require.

Each puzzle map script must contain the following snippet:

local map, data = ...

local puzzle = require 'maps/components/obstacle_puzzle/obstacle_puzzle'

puzzle.init(map, data)

Apart from the common obstacle tiles the map requires one or more of the following:

  • Plots are placed as dynamic floor_pot tile which must be prefixed /pot_. No actual pots are placed in the map.
  • Blocks that are candidates for the switch should be placed as block entities with the appropriate pushable settings. Blocks should never be pullable. The block must be prefixed block_

The map also needs:

  • A walkable switch which must be named switch. Place it in the corner of the map, the helper will position it.
Clone this wiki locally