Trivia Round

Iterates through trivia questions, and users expecting user response

When to use?

Only available in trivia package

How to use:

  1. Make sure you've got an array containing trivia multiple-choice questions, possible answers and the correct answer and letter for each question
  2. If the game is a multiplayer, make sure you've got an array containing player names and scores (can be just initialized to zero)
  3. In the Questions field enter the expression to evaluate the questions array, like this: ${questions}
  4. if the game is a multiplayer, in the Users field enter the expression to evaluate the players array, otherwise, leave the field empty, for example: ${players}
  5. In the Status variable name enter the name under which you'll be able to access individual array items, for example: status
  6. In the Correct letter field enter the status expression to evaluate the correct letter, for example: ${status.question.correctLetterKey}
  7. In the Correct answer field enter the status expression to evaluate the correct answer, for example: ${status.question.correctAnswerKey}
  8. You can set the Skip reset field to true (or an expression that evaluates to true) to skip resetting status variables after the iteration is interrupted, for example: ${some_var}
  9. Block's main process phase and it's built-in intents are hidden, but you can add your own in the Additional Intents container
  10. You can add processors that don't trigger loop iteration in the Other Processors container, for example, processor for repeating questions
  11. To access current question, use this syntax: ${status.question.questionKey}
  12. To access current question answers array, use this syntax: ${status.question.answersKey}
  13. To access current question correct answer, use this syntax: ${status.question.correctAnswerKey}
  14. To access current question correct letter, use this syntax: ${status.question.correctLetterKey}
  15. (multiplayer) To access current player name, use this syntax: ${status.user.nameKey}
  16. (multiplayer) To access current player name, use this syntax: ${status.user.scoreKey}
  17. You can access current question index: ${status.question_index}
  18. (multiplayer) You can access current user index: ${status.user_index}
  19. To check if it's the last question, use this syntax: ${status.last_question}

Example of usage

We have a multi-dimensional questions array in this format: questions[index]["question"], questions[index]["answers"][index]["answer"], questions[index]["correct_letter"] etc.

We also have a multi-dimensional players array in this format: players[index]["name"], players[index]["score"]