I’m building a trivia game where a series of multiple choice questions appear. When the user clicks on an answer option, it adds/subtracts points from their score and causes the next question to appear.
I’m trying to have the workflow happen like this:
- User clicks on answer option
- Animation happens to slide out the previous question which they just answered
- Next question loads while the question is not visible
- A second animation happens to slide in the next question
No matter what I do, every single time the sequence happens like this instead:
- User clicks on answer option
- Animation happens to slide out the previous question which they just answered
- Animation happens to slide in the next question, but the old question text and answer options still display
- Next question data replaces the previous question, causing a sort of “glitch” in the user experience
I have tried using custom events, which supposedly are supposed to complete before the next one begins. I have also tried setting a yes/no value custom state AFTER the question is changed, and using this custom state in a “When condition is true” trigger to animate in the next question.
Nothing I have tried works. Is there a way to force this functionality to happen in the order I need it to?
