Skip to main content
Known Participant
October 4, 2017
Answered

Setting up "Choose Avatar functionality and displaying the selected avatar in rest of the project"

  • October 4, 2017
  • 1 reply
  • 788 views

Hi All,

I have created a story for some quiz questions and the user has to choose an avatar before proceeding to the quiz.

But I am not able to figure out, how to display the character based on the user’s selection. For example, the two characters that I have used are John and Ellet. If I select John in the character selection page, John should appear in the result screen instead of Ellet.

I was able to achieve the same using Storyline but not able to figure that out in Captivate.

The idea that I am having is by assigning variable to the two characters: John and Ellet. For John I will have variable J with default value false and for Ellet the variable will be E with default value false. When user clicks on any of the character, for example if he/she clicks on John then J will turn to true and E will remain false.

This condition can be used in result slide, to display John instead of Ellet. There can be a hidden shape with two states: one for John and other for Ellet.

If J is true, change state of the shape to state John and if E is true, change state of shape to Ellet.

I am not sure about how to create true/false variable and assign them value when user clicks on the character button.

Kindly help me with this. Kindly share the sample if anyone in the community has created the avatar choose functionality for the user.

Thanks a lot in advance.

    This topic has been closed for replies.
    Correct answer Lilybiri

    You make it more complicated than necessary.


    Create one user variable (Project, Variables), will label it v_avatar. You can leave the default value empty.

    Turn the images of the avatars into shape buttons. Have a look at:

    Turn an Image into a Button - Captivate blog

    Shape buttons have two events: when clicked, you can execute an action, that is the Success event. Leave the number or attempts at Infinite, you'll not have a Last Attempt in that case. For the Success event, choose the action 'Assign', as variable v_avatar. and depending on the avatar choose the wanted value:

      Assign v_avatar with John

    or

      Assign v_avatar with Ellet.

    I don't know if you want the playhead to continue or not, there is an option for that.

    On the score slide you'll need to create a conditional action. Since I don't know which version you are using, will not post a screenshot (advanced actions dialog box has changed in CP2017).

    IF v_avatar is equal to John

         Change state of shape to John              provided that is the name of the state

    ELSE

         Change state of shape to Ellet

    1 reply

    Lilybiri
    LilybiriCorrect answer
    Legend
    October 4, 2017

    You make it more complicated than necessary.


    Create one user variable (Project, Variables), will label it v_avatar. You can leave the default value empty.

    Turn the images of the avatars into shape buttons. Have a look at:

    Turn an Image into a Button - Captivate blog

    Shape buttons have two events: when clicked, you can execute an action, that is the Success event. Leave the number or attempts at Infinite, you'll not have a Last Attempt in that case. For the Success event, choose the action 'Assign', as variable v_avatar. and depending on the avatar choose the wanted value:

      Assign v_avatar with John

    or

      Assign v_avatar with Ellet.

    I don't know if you want the playhead to continue or not, there is an option for that.

    On the score slide you'll need to create a conditional action. Since I don't know which version you are using, will not post a screenshot (advanced actions dialog box has changed in CP2017).

    IF v_avatar is equal to John

         Change state of shape to John              provided that is the name of the state

    ELSE

         Change state of shape to Ellet

    Known Participant
    October 4, 2017

    Thanks a lot for a quick response.