Forum Discussion

ChristyDotson's avatar
ChristyDotson
Community Member
1 month ago

Words stay on screen despite state change - normal or no?

Background

I have a project that we are adding a 'help' character to. At the bottom of the screen they are holding a card with the text 'hint?'.  When the user clicks on the character the state is to change to another position and a help bubble appear with help text. When the user clicks outside the character, the character goes back to the normal position.

Problem 

Previewing/testing this, when I click on the character the state changes and the help bubble appears as anticipated. But the 'hint?' text stays on the screen.

I would have anticipated that the text should have hidden/changed along with the character since the text is tied to the state of the character.

 

5 Replies

  • I presume these are words you have added to the normal state, all built in states builds off normal state, it is easier to create a custom start state add the words in there and ensure all other states are custom

    • ChristyDotson's avatar
      ChristyDotson
      Community Member

      Thanks for the reply Phil! 

      Yes, these were added to the normal state. I haven't had an opportunity to play a ton with states yet so learning as I go. 

    • ChristyDotson's avatar
      ChristyDotson
      Community Member

      I had a chance to get in and play with this and still having the words 'sticking'.

      Steps followed for States:

      • Created a custom state (copying from normal state) called Resting.
      • Removed the words from the Normal state.
      • Set the Initial state to Resting (from normal).
        States panel

      Steps followed for Triggers:

      • Set state of character to Selected when the user clicks on Character
      • Set state of Character to Resting when the user clicks outside of Character (we want the state to return to resting/default when user is done interacting with the character).
        Triggers panel

        When I preview the slide the words are still showing despite the state changing as anticipated (circled in red to help highlight due to low contrast).

         

  • ChristyDotson​: As PhilMayor​ said, the built-in states are built on top of the Normal state. This image shows how they get layered: 

     

    Using custom states is an option. But, for your situation, it sounds like you want to take advantage of the built-in functionality for toggling between the Normal and Selected states. 

    Depending on how your character is set up, here are some workarounds so "hint" doesn't show in the Selected state:

    • Is "hint" entered in a text box inserted into the Normal state? Then change the text color to white (or whatever color the sign is). 
    • Is "hint" a non-editable image? Then cover it with a rectangle that matches the color of the sign. 

     

    FYI: Here's my post about built-in states. It includes a Review 360 link with a slide that demonstrates the layering. 

  • ChristyDotson's avatar
    ChristyDotson
    Community Member

    Thanks JudyNollet​! This is super helpful.

    I realized I missed a crucial step that PhilMayor​ mentioned that all states should be custom. Not using any of the built in states (not just avoiding the Normal state).

    My original work around was a trigger on the text box that matched the triggers for when they click the character. It worked but seemed clunky from a development perspective and I was sure there was a smoother way to do it.