werew wrote:I'm currently trying to transfer a gamebook that I started building in Quest into squiffy, and was, for the most part, delighted to find that most of the things I had going on translated well with a little modification. However, when I got to a page that has a few {once:text} commands on it, I copied it over, hoping that they'd "just work" like the {if flag:text} commands had, but they just return a quiet little 'null' in the middle of my page. Is there any squiffy equivalent? Or any other way to achieve the same result?
At the moment there does not seem to be a built-in feature for showing text only once. I have gotten around it by creating a number that increases every time you view the section or passage, and only displaying that text when the number = 1. For instance:
@set number_times_viewed_text=0
Go to the [[repeating section]](Repeat).
[[Repeat]]:
@inc number_times_viewed_text
{if number_times_viewed_text=1:This message will display only once.}
This message will display every time.
[[Repeat this section.]](Repeat)