Revision of Twine macro: << timedreplace >>, << replacewith >>, << endtimedreplace >> from Thu, 01/31/2013 - 09:18

This code causes the passage text in between the <<timedreplace>> and <<replacewith>> tags to be replaced with what is between those and the <<endtimedreplace>> tag, after a certain number of halves of seconds have elapsed.

Copy the code in here: http://www.glorioustrainwrecks.com/files/TwineMacro-TimedReplace.txt

Special feature: the <<replacewith>> tag can be omitted! If that is the case, then everything between <<timedreplace>> and <<endtimedreplace>> tags appears when the time elapses.

Usage examples:
*<<timedreplace 4 >>You see nothing. <<replacewith>>You see a ''light'' in the distance.<<endtimedreplace>>
*You search. <<timedreplace 2>>You find nothing.<<endtimedreplace>>.

Example program.

AttachmentSize
TwineMacro-TimedReplaceTest.html37.82 KB
TwineMacro-TimedReplace.txt1.62 KB