This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
example_files [2014/01/11 23:18] l [Visited()] |
example_files [2017/10/09 20:39] (current) |
||
---|---|---|---|
Line 13: | Line 13: | ||
====Passage Macros==== | ====Passage Macros==== | ||
- | http://l.j-factor.com/twine/examples/PassageMacro.tws | + | http://l.j-factor.com/twine/examples/PassageMacros.tws |
This file shows how, by using the [[<<display>>]] macro's shorthand, the [[function|parameter() function]], and, optionally, the [[tag|nobr tag]], you can write passages and invoke them as if they themselves were macros. The example code shows a basic use-case: creating a macro that varies the player's pronouns depending on their initial choice. | This file shows how, by using the [[<<display>>]] macro's shorthand, the [[function|parameter() function]], and, optionally, the [[tag|nobr tag]], you can write passages and invoke them as if they themselves were macros. The example code shows a basic use-case: creating a macro that varies the player's pronouns depending on their initial choice. | ||
Line 45: | Line 45: | ||
http://l.j-factor.com/twine/examples/StoryMenu.tws | http://l.j-factor.com/twine/examples/StoryMenu.tws | ||
- | This file simply serves as an example of imported [[image]]s, and the way in which they can be used both in [[passage]]s and in [[stylesheet]]s. | + | This file serves as an example of using macros inside the StoryMenu, demonstrating that it automatically updates whenever the player changes passages. |