Hello there,
I have been working on the Trivia script for some time now, and it is very close to finished. I am having trouble finding the correct way to track the score during the game. I want to have two differnt scores tracked. One is 'all time' score (your total score saved for the WHOLE year) and the other score is that of the current game/trivia quiz.
When a player gets an answer correct, here is my trigger.
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="trivia"
keep_evaluating="y"
match="Joe says, 'Congratulations, *! You are correct!'"
send_to="12"
sequence="100"
>
<send>SetVariable ("%1", (GetVariable ("%1") or 0) + 1)
SetVariable ("%1alltime", (GetVariable ("%1alltime") or 0) + 1)</send>
</trigger>
</triggers>
The "%1alltime" variable seems to work great. It will keep their saved score until I reset it.
I need a better way to track their 'current' score so I can display a small score board at the end of a quiz.
Also when I start the game and end the game, I will need to wipe this temporary score board, as my other saved variables will keep the scored from day to day.
My all time score might need to be replaced, as I would like to get it into some sortable table so that I could easily report the top ten players, and so forth.
In a nut shell...
Thank you
I have been working on the Trivia script for some time now, and it is very close to finished. I am having trouble finding the correct way to track the score during the game. I want to have two differnt scores tracked. One is 'all time' score (your total score saved for the WHOLE year) and the other score is that of the current game/trivia quiz.
When a player gets an answer correct, here is my trigger.
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="trivia"
keep_evaluating="y"
match="Joe says, 'Congratulations, *! You are correct!'"
send_to="12"
sequence="100"
>
<send>SetVariable ("%1", (GetVariable ("%1") or 0) + 1)
SetVariable ("%1alltime", (GetVariable ("%1alltime") or 0) + 1)</send>
</trigger>
</triggers>
The "%1alltime" variable seems to work great. It will keep their saved score until I reset it.
I need a better way to track their 'current' score so I can display a small score board at the end of a quiz.
Also when I start the game and end the game, I will need to wipe this temporary score board, as my other saved variables will keep the scored from day to day.
My all time score might need to be replaced, as I would like to get it into some sortable table so that I could easily report the top ten players, and so forth.
In a nut shell...
Thank you