Trivia Game

yoyobid12yoyobid12 Member, PRO Posts: 21

Hello the world,

I'm planning to developp a trivia / quiz with image. I have a solution with one scene for each question ( with random question relative to the scene)....

Do you think that is possible to have one ( or several) table(s) to manage the game ( question / answer / image / music...) without creating a scene for each question?

The best of luck for your projects.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Yes, absolutely. In your table, each row should contain one question and answer. Just increase a game attribute such a game.questionNumber by one each time and use that attribute as the row in table expressions such as tableCellValue(). You can also use it to change an actor's image by naming your images 1.png, 2.png, 3.png, etc. and then constraining that actor's self.Image to game.questionNumber.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • yoyobid12yoyobid12 Member, PRO Posts: 21

    Thanks for the tip. And for music i rename my files as 1.mp3 ? Did i must add a play behavior ?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Unfortunately, there is no way to use an expression to select a music file. You would need a rule that says When attribute game.questionNumber=1, Play Music/Sound [1.mp3]. And you would need one rule for each sound file.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.