Can anyone help me where is my mistake in my JSON text or condition and action event in GDevelop? I want to make some kind of trivia game, but when I use the questions.json file the answer can only be in option 1, it cannot be changed to other options. If I use the Try.json file if the answer is correct then the next question will be skipped, if the question is wrong it will continue to the next question. I think there is an error when saving the file but I don’t know how.
For the questions.json file, I copied and pasted it from chatgpt to a JSON file using the Notepad++ application. For the Try2.json file, I typed it myself, the same as from questions.json, using the Notepad application, then saved it with UTF-8 encoding.
When you click an answer, it loads the next question. It evaluates both the equals and doesn’t equal events. So, if the player clicks the right answer then it shows the next question and then it checks if the wrong answer was pressed and then if it’s wrong will show the next question.
You could use a boolean variable like clicked.
This would handled the right and wrong check.
You could simplify things greatly by using object groups and for each child and by putting the show question function into an external event or extension or an event that uses a boolean to trigger it.
Set a boolean variable like showQuestion to true when you want to show the next question.
If showQuestion is true, set showQuestion to false and show next question.