GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Trivia Game

yoyobid12yoyobid12 Posts: 21Member, PRO

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 Posts: 11,907Member, Sous Chef, PRO, Senior Sous-Chef

    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 Posts: 21Member, PRO

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

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

    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.