Hello all, I am making a trivia game, everything went fine until now… I followed a Thunkable tutorial and I got in that point, I made a loop blockchain and a database so it’s going to be easier but when I open the app one random question appear and then after I respond the same question remain, what can I do so other question would come?
P.S. I got other blocks with correct answear and other stuff, they work fine, only this problem.
This are all the blocks, I tried to fit all of them inside this photo… If there is any other block that will tell the program to pick another question that wasn’t picked I would love to see it, maybe will fix my problem
The questions are changing now, but the correct answear isn’t matching after the first one, sometimes it changes the correct answear but not the rest, pretty weird
can you post the contents of your table.
can you post a screen that shows you answered the question correctly - then show one where the question doesnt have the correct answer.
This is the link of the project ( Thunkable ), I am trying for now to understand how it’s working, after that I will work more at the design and other stuff, but the question randomization it’s a pain xP
Here is what you need to do. You are trying to change the question before assigning a new question number. I moved the get random integer to just before the update question. And now it works
It works <3, thank you so much ^^ … I have one more question, is there any way to set the question number to be unique? Like when you start once, if you give the answear, doesn’t matter if it’s correct or not, you’re not gonna take this question again. Because a 0/40 trivia, to see your score at the end is a good idea xD
You need to use a different method for randomizing questions without repeating them. One way to do this is to create a database/table with cell values for each question number:
1
2
3
4
etc.
Then, when you want to pick a random question number, choose a random row from 1 to the number of rows in the database. Store that number as the question number (in a variable). Delete the row from the database. Repeat until all rows have been used up.
It’s possible to do this with a list instead but if you’re not experienced with using lists, I would probably recommend sticking with a database.
you can use this technique: create a shuffled list of numbers from 1 to # of questions. (eg. 7,4,1,2,6,3,5)
as you run your quiz, start using numbers from the left. when you’ve used 7, remove it from the list , leaving 4,1,2,6,3,5. when the list is empty you’ve used them all up.
here’s a picture of the blocks.
I will look into that also, for now I put a limit of 3 fails, and I want to have a lot of questions so if 2-3 questions will come again won’t be a problem… I got only one more question, when I upload a gif I got a error with “Please select a animation file” and nothing shows, any idea how I could repair that? Thanks everyone for the help ^^
I guess it worked, thanks again ^^… I add some more question and now I have to figure out how to stop the acces to the button after 1 resonse, cuz now if I spam a button I will respond more times on a single question and it’s bugging the score