I'm using Sugarcube and I'm trying to do a story with some questions mixed in it with answers. Each answer is worth different points and takes you to different points of the story. They are all normal links, and I am trying to work out either clicking on the link or when you visit the page the link takes you will assign you a some points. Then when you reach the end it keep tracks of all the points and show you. Not entirely sure how to go about doing this as a new twine user. Any help or point in the right direction will be much appreciated!
It seems that you should generally take a little time to read one of the basic tutorials floating around, like this one.
Other than that, this is a variable:
this is how you set up a variable:
In this case it's a number, but it can also be a string:
and a number of other things. Most of the time you'll want to put this kind of initial setup into the passage titled StoryInit
This is how you add one to your points:
This is a setter link:
It will be named "linkname" and send the player to "passagename", all while adding 1 to $points.
Edit: I just saw @Chapel already gave pretty much the samed answer in the identical other question you posted.
Then on your link do:
Why? Well if they get back to the question they won't be able to score points for it twice.
You could even use:
...to hide answers they've already given, but ensure there's always something they can pick.
Code untested, but should be pretty close.
That all sounds a tad unnescessary. Why would you link the player back to already answered questions?