Modifiers
All of the below affect the text following them. See Modifiers and Inserts for more information.
-
[after time]
- Causes the text to appear after a certain amount of time has passed after the passage is first displayed.
-
[align center]
,[align left]
,[align right]
-
Causes the text to be aligned a particular way. Aligning left isn't needed under normal circumstances, but is included for compeleteness's sake--use
[continue]
instead. -
[append]
- Used in conjunction with another modifier to have text immediately follow the text preceding it, instead of appearing in a new paragraph.
-
[continue]
,[cont'd]
,[cont]
- Clears all previously active modifiers.
-
[CSS]
-
Acts like a
<style>
tag in the passage; the contents of the text will be interpreted as CSS rules instead of normal text. -
[else]
-
Only displays the text if the previous
[if]
condition was not met. If no previous[if]
appeared in the passage's source code, an error occurs. -
[if expression]
- Only displays the text if expression evaluates to true, or a truthy (as defined by Javascript) value.
-
[ifalways expression]
-
Acts like the
[if]
modifier, except that it always displays the text it affects, regardless of the condition. This can be useful for quick testing. -
[ifnever expression]
-
Acts like the
[if]
modifier, except that it never displays the text it affects, regardless of the condition. This can be useful for quick testing. -
[JavaScript]
-
Acts like a
<script>
tag in the passage; the contents of the text will be interpreted as JavaScript code instead of normal text. To write output from inside the text, use the function `write()`. -
[note to self]
,[note]
,[todo]
,[fixme]
- Causes the text to never be visible to the player. This is useful for leaving notes or other information for yourself.
-
[unless expression]
- Only displays the text if expression evaluates to false, or a falsy (as defined by Javascript) value.