0 votes
by (180 points)

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.

 

(Sugarcube)

 

 

2 Answers

+2 votes
by (63.1k points)

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. 

0 votes
by (159k points)

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.

...