User Tools

Site Tools


displaying_a_passage_within_another

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
displaying_a_passage_within_another [2013/12/12 20:57]
l [Shorthand form]
displaying_a_passage_within_another [2013/12/12 20:59]
l [Shorthand form]
Line 46: Line 46:
 ====Shorthand form==== ====Shorthand form====
  
-The <<​display>>​ macro is special among Twine macros because it has a shorthand form. Instead of writing <<​display "​passage">>,​ you can simply write <<​passage>>,​ as if it was another macro. (**Note:** this only works when the passage name is a constant value, and //​not// ​a variable!) This allows you to write Twine stories in a "​template"​ style:+The <<​display>>​ macro is special among Twine macros because it has a shorthand form. Instead of writing <<​display "​passage">>,​ you can simply write <<​passage>>,​ as if it was another macro. (**Note:** this only works when the passage name is a constant value that does //​not// ​contain spaces!) This allows you to write Twine stories in a "​template"​ style:
  
 <​code>​ <​code>​
 :: Battle start :: Battle start
- 
 With a resounding cry of "<<​battlecry>>",​ your <<​minions>>​ rush into battle! With a resounding cry of "<<​battlecry>>",​ your <<​minions>>​ rush into battle!
  
 :: battlecry [nobr] :: battlecry [nobr]
- 
 <<if $morale > 2>> <<if $morale > 2>>
 Victory is ours! Victory is ours!
Line 62: Line 60:
  
 :: minions [nobr] :: minions [nobr]
- 
 <<if $species is "​globbo">>​ <<if $species is "​globbo">>​
 globlings globlings
displaying_a_passage_within_another.txt ยท Last modified: 2017/10/09 20:39 (external edit)