Table des matières

Drag & Drop

Drag & drop lets the player take an element from the text and drop it onto a target. It is available on web, desktop and interactive HTML exports. Other adapters display the content without drag&drop interaction.

Sources And Targets

text: "The {{door:$door}} is locked. The {{key:>key}} shines on the floor."

The syntax also works with pictures:

text: "Drop {{[[/scenarios/images/test/un.png]]:>token}} onto the {{slab:$slab}}."

Drop Event

An event becomes a drag&drop pair when it contains source: and target:.

text: "The {{door:$door}} is locked. The {{key:>key}} shines on the floor."
interaction-ko: "Nothing interesting happens here."

events:
  - id: key_on_door
    source: key
    target: door
    do: "door_locked.=.0"
    text: "The door opens."
    text-ko: "This key does not open that door."
    once: true

Conditions

Showing Roles

By default, sources and targets use a neutral style. To show roles visually, enable show-type: true at scenario level or only in a room.

show-type: true

rooms:
  - id: workshop
    show-type: true
    text: "{{hammer:>hammer}} / {{anvil:$anvil}}"

When a value is defined in a room, it overrides the global option for that room.

Join us on discord Make&Play