So for my game I am needing to have a stats sheet, very choice of games style where the decisions players make affect their stats.
Right now I just have something pretty basic because I don't think it should be too complicated. On my start page I set my values to 0. so something like:
(set: $kindness to 0)
no problem. From there I'm using a header to lead to stats page which is supposed to display the Stats the player has accumulated so simply something like:
Kind: (print: $kindess)
This is all no issue until I try and change the values on my stat page. So say my player choices a path which gives him +1 to kindness I have this notated as:
(set: $kindness to $kindness+1)
which does, I recognize, change the value of "kindness" in that passage itself, however, once I press my link to my stats page, it's still printing a value of 0. I am wondering how to make sure the stats page is updating properly.
Thanks.
Comments
A couple of points about your examples.
1. Please use the C button found in the comment field's tool bar to wrap your examples with a code tag, it makes them easier to find and read.
2. Instead of initialising your variables within the first passage of your story you should do that within a startup tagged passage. You can place CSS like the following within your story's Story Stylesheet area to hide any white-space generated by the tagged passage.
3. As explained in the Variable markup section of the manual, you don't need to use a (print:) macro to display the value of a variable on the page. note: In your example you have mis-spelt the variable name ($kindess instead of $kindness) and this is what is causing your error!
4. I suggest using the it keyword when updating a varaible's value, it will lower the chance of misspelling the variable's name.
One further suggest in relation to your header tagged passage containing the Stats markup link. You can use code like the following within your header tagged passage to ensure that the Stats link is not displayed while viewing the Stats passage. (or whatever you named it)