User Tools

Site Tools


Sidebar

Passage markup

basics

coding

extra

list

section

whitespace

Macros

basics

colour

data structure

date and time

game state

live

maths

number

revision

saving

showing and hiding

string

styling

url

deprecated

Types of data

Special keywords

Special passage tags

harlowe:link-repeat

(link-repeat: String) → changer

Makes a command to create a special link that shows a hook, and, when clicked again, re-runs the hook, appending its contents again.

Example usage:

(link-repeat: "Add cheese")[(set:$cheese to it + 1)] will create a link reading “Add cheese” which, when clicked, adds 1 to the $cheese variable using (set:), and can be clicked repeatedly.

Rationale:

This is similar to (link:), but allows the created link to remain in the passage after it is clicked. It can be used to make a link that displays more text after each click, or which must be clicked multiple times before something can happen (using (set:) and (if:) to keep count of the number of clicks).

Details:

This creates a link which is visually indistinguishable from normal passage links. Each time the link is clicked, the text and macros printed in the previous run are appended.

See also:

harlowe/link-repeat.txt · Last modified: 2017/10/10 00:39 (external edit)