I was wondering if it was possible to show stats in the StoryCaption after a certain passage. Say my first 4 passage are intro about a girl heading into the woods on an adventure and the 5th is actual gameplay. I would like my stats to appear than on the 5th passage like $health, etc and not before that. I have tried If but it didn't work.
StoryCaption after a certain passage. Say my first 4 passage are intro about a girl heading into the woods on an adventure and the 5th is actual gameplay. I would like my stats to appear than on the 5th passage like $health, etc and not before that. I have tried If but it didn't work.
(Sugarcube)
You can place an <<if>> statement in the StoryCaption passage. Eg
<<if hasVisited("passage to start story caption")>> /* code for stats */ <</if>>
You can also use turns() or set a story variable.
You could also assign a known Passage Tag to the passages for which you don't want to see the Stats, and then use a <<if>> macro condition that uses the tags() function and the <array>.includes() function.
eg. Assuming you have assigned a no-stats Passage Tag to the first 4 passages(untested example)
<<if not tags().includes("no-stats")>> /* Code to display Stats goes here. */ <</if>>
One good thing about this method is that you can use it to hide the Stats for any Passage within your project.