How to Change Character Expressions

Here's my situation: I want to create a game based quiz having 5 question. Want to use avatar or character in my quiz with different expression. I want to change the character expression keep changing depending on the right and wrong answer, suppose If i select a right answer of Q1 and submit than in the next question2 my character should be more pleased and on Q3 more smiley and keep changing the expression depend on the right and wrong answer selection.

I know it can be possible with stats or variable, if someone can guide me it would be great help.

 

 

7 Replies
Judy Nollet

Hi, Shira,

Yes, it's possible with states and a variable. Here's how I'd accomplish what you describe: 

  • Create a number variable, with an initial value of 0. 
  • Insert the character, and add states for the different expressions.
  • Copy and paste that character to where you want the character to appear. 
  • On each question, create a trigger that adds 1 to the variable IF the user answered correctly.
    • Depending on how you program the game/quiz, this could be done via a trigger with a condition or just by putting the trigger on the Correct feedback layer.
    • You could also consider subtracting for wrong answers. But for a 5-question quiz, that's probably more complicated than what's needed.
  • Wherever the character appears, add triggers to change its state based on the value of the variable. For example, change the character to the slight-smile state when the timeline starts with the condition that the variable = 1. 

For more info on conditions, states, and variable, see these entries in the User Guide: 

Judy Nollet

Hi again, Shira,

In your file, every slide has a trigger that adds 1 to the Face variable when the user clicks the correct radio button. For example, this is from slide 1: 

  • Those triggers aren't needed. In fact, they could really throw things off. For example, the user could click the correct button, change their mind and click another button, and then re-click the correct button. Before they even click SUBMIT, the value of the Face variable would be up to 2.

In my edited version of the file (attached), I deleted those radio-button triggers. That fixed the problem with the score. 

  • You'll notice that I also added a text box under the character. It shows the value of the Face variable. It really helps with troubleshooting to put variable values on slides while you're developing a course. Then, after everything is working, you can either delete those text boxes, or just move them off the slide area (so they're handy in the future). 

Also, in the character states, states 01 and 02 get increasingly happy. However, states 03 and 04 look unhappy. That's disturbing, because he looks upset  if the user answers the first 3 questions correctly. So you need to either fix the states, or just make state 02 the highest/happiest one.

One more thing: I notice that you subtract 1 from the variable on the Incorrect layers. That makes sense if you want to show increasingly unhappy states if the variable goes down. But if there's no consequence, there's no need to include those triggers. 

Shira jose

Dear Judy,

Thank you so much for your help. I really appreciate it, when i run your file its works well only if i am selecting all the right answers, but if i select wrong answer at any stage the next question expression shows stats 1 expression and after that it does not change the expression. var value is working well in the bottom but expression its not changing, i have attached the file please have a look.

Once again thank you much and looking forward your reply.

Judy Nollet

Hi, Shira,

I assume the latest issue was related to needing a trigger for each possible state the character could be in. I'm glad you were able to resolve your problem on your own. I don't subscribe to Forum posts, so I don't get notified when someone responds to one of my answers. I usually come back to recent posts, but the timing is based on when I have time to visit the Forum. 

Best wishes for successful projects!