Now let's take a closer look at the other elements.
<<nobr>><</nobr>> prevents any linebreaks made in between them from being shown. To do a break anyway you can enter <br>
The above references str property of the player character object ($pc) we have created in StoryInit. When we test the game entering the above we will see 0, which is the initial value we gave to this property. To add and substract from this property we use the <<set>> macro:
<<set $pc.str++>> \*This adds one to the property*\
<<set $pc.str-->> \*This substracts one from the property*\
<<set $pc.str+=3>> \*This adds three to the property*\
<<set $pc.str-=3>> \*This substracts three from the property*\
We can have the player add or substract from the property with the help of a link:
<<link "+">><<set $pc.str++>><</link>>
This creates a link that looks like a simple plus sign. When clicked the link won't send thje player anywhere. Instead it will add one to $pc.str. Since we only want one to be added to the property as long as the player still has upgrade points available, we use an <<if>> statement checking whether $upgrade is greater than 0 firs and then substrac one from $upgrade as well since the player spend an upgrade point:
<<if $upgrade > 0>>
Now we want to make the player see the change they made by clicking the link. For this we create a span with a specific id we can reference:
@@#strength;This text will be shown.@@
In the end game the above will just show "This text will be shown." - but invisibly to us that string will now have the specific id "strength" attached to it. We can use the <<replace>> macro to change everything within this span:
@@#strength;This is the old text.@@
<<link "New Text">>
This will be the new text.
Combined with our link that adds one to the players strength ($pc.str) we can now show the player how the amount of their upgrade points and the strength of their character change when they press the "+" link:
Uprade points available: @@#points;$upgrade@@
Current strength: @@#strength;$pc.str@@
<<if $upgrade > 0>>
Now we can use the same principle to substract points and then do the same for any of the other stats we have. Finally -to make sure the player can only move on once they have spend all their points- we have the Continue link check with another <<if>> whether $upgrade is zero before sending them to the next passage using the <<goto>> macro.