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:hook

(hook: String) → Changer

A Command that allows the author to give a hook a computed tag name.

Example usage:

(hook: $name)[]

Rationale:

You may notice that it isn't possible to attach a nametag to hooks with commands already attached - in the case of (font:"Museo Slab")[The Vault]<title|, the nametag results in an error. This command can be added with other commands to allow the hook to be named: (font:"Museo Slab")+(hook: "title").

Furthermore, unlike the nametag syntax, (hook:) can be given any string expression: (hook: "eyes" + (string:$eyeCount)) is valid, and will, as you'd expect, give the hook the name of eyes1 if $eyeCount is 1.

See also:

harlowe/hook.txt · Last modified: 2017/06/18 22:56 by l