Store Score Action

image\Actions_Score_Store.jpg

The Store Score action allows you to award points to Scoring variables when the user supplies a correct, incorrect or a partially correct answer to a question.

This action is normally triggered when a user selects their response to a question. For example, if you created your action which produced a score when two objects collided, you could have a Store Score action activated when the user activates an Collision Enter trigger.

Note:
You don’t have to worry about the Scoring variables as Opus fills in the details for you, however, if you want to show the user their current score you will need to know which Scoring variables to use – see Preset Variables Glossary for a list of Scoring variables available in Opus.

Setting up the Store Score action:

1. Add the Store Score action to your trigger, as described in adding actions. The Store Score tab will automatically appear when you add the action.

2. Use the Store Score as panel to set if this action is adding points to the Scoring variables because the response by the user is correct or incorrect. Click Correct when the users response is the correct answer to the question, and Incorrect if it is not.

 A running total of correct answers are stored in the Scoring variable SCORE_CORRECT (e.g. 3 out of 5 are correct), while incorrect answers are stored in SCORE_INCORRECT variable. The SCORE_TOTAL variable shows the total number of questions answered.

In the Score Value panel below you can set the user’s response as partially correct, for example, you can award 3 points out of 5 for giving this response.

3. Use the Score this answer as worth box in the Score Value panel to enter the amount of points you want to award for the user’s response. This can be a positive or a negative number. Use the spin buttons to set the number or type it directly in the box.

Note:
Notice this is the amount of points awarded for the users response and NOT necessarily the total amount of points that can be awarded for this question – e.g. the user may get 3 points but 5 points could be the maximum they could get (see next point).

The number entered here is added or subtracted from the Scoring variable SCORE_VALUE, which contains the user’s current total score.

4. Use the …out of box in the Score Value panel to enter the total number of points that can be awarded for this question. This can be a positive or a negative number. Use the spin buttons to set the number or type it directly in the box.

Note:
The number entered in this box is added to the Scoring variable SCORE_VALUE_TOTAL which is a running total of the maximum possible points awarded for all questions asked so far.

5. Click on the Apply button to save your changes.

You may want to keep the number of points awarded for this question in a separate variable, so that at the end of the quiz you can tell the user the number of points awarded for each question answered. In this case, create a new variable in your publication and save the points awarded in it. You could use a standard Publication variable to save the data and add a Set Variable action to the same trigger as this Store Score action.

Alternatively, an Array variable would be a good method of saving the users points for each question, in which case you would add a Set Variable Array action to the same trigger as the Store Score action and add the users points to an element of the array.

Related Topics:

Introducing the Scoring Actions

Preset Variables Glossary