Build a trivia game
Ask a question, players run onto the colored pad for their answer, then you reveal it — everyone on the right pad scores a point. It's a game-show host in a few small functions, and it scales to as many questions as you like.
1. Start and show the score
Set up a score objective on the sidebar, zero everyone out, and jump into the first question.
# functions/trivia/start.mcfunction
scoreboard objectives add score dummy "Score"
scoreboard objectives setdisplay sidebar score
scoreboard players set @a score 0
function trivia/q1
2. Ask a question
Put the question on screen with /title. Build two answer pads out of colored wool nearby — lime for one answer, yellow for the other — and label them with signs.
# functions/trivia/q1.mcfunction
title @a title Question 1
title @a subtitle Lime = Grass, Yellow = Sand? 3. Reveal the answer
Give players a few seconds to pick a pad, then run the reveal. It checks who's standing on the correct pad (lime) and scores them — everyone else just sees the answer.
# functions/trivia/reveal1.mcfunction
execute as @a at @s if block ~ ~-1 ~ lime_wool run function trivia/correct
title @a actionbar The answer was Grass (lime)! # functions/trivia/correct.mcfunction
scoreboard players add @s score 1
playsound random.levelup @s
title @s actionbar Correct! +1 execute as @a at @s if block ~ ~-1 ~ lime_wool is the whole judge — "for each player standing on lime, score them."
Add more questions
- · Copy q1/reveal1 to q2/reveal2, and so on — run them in order as host.
- · Chain them automatically with a delay by calling the next question from the reveal (see chaining functions).
- · Reward the leader at the end with /give or a firework /summon.
- · Add a wrong-answer buzzer: a red pad that plays note.bass instead of scoring.
See it in Minecraft
The question fills the screen while the live score sits on the sidebar — players pick their pad, then you reveal.
The quartz stage and colored answer pads in the shot are a few fills — run this once:
# functions/trivia/build.mcfunction — a stage with answer pads
fill ~-8 ~ ~-7 ~8 ~1 ~7 quartz_block
fill ~-5 ~2 ~-4 ~-1 ~2 ~2 lime_wool
fill ~1 ~2 ~-4 ~5 ~2 ~2 yellow_wool Make it flow.
Have each reveal call the next question so the game runs itself.
Chain functions together