Forum Discussion

ElizabethDou037's avatar
ElizabethDou037
Community Member
6 years ago

Variable use - Text. Not displaying??

Hi. I am trying to build a storyline that uses variables. I want a variable 'Roleis' (text) which is adjusted depending on the menu option that is selected. If they click on 'business manager' menu, the 'Roleis' is adjusted to the value of 'Business manager'

And then, when that menu takes them to another slide, the title of the slide will display '%Roleis% courses'.

but - %Roleis% does not display, and I can't see if my adjust variable function is working.

 

any suggestions.  This is in a concept model stage only. Clearly hasn't been built out.

thanks

 

 

6 Replies

  • NedWhiteley's avatar
    NedWhiteley
    Community Member

    Hi Elizabeth,

    This is an easy fix. You simply need to change the order of your triggers to get this to work. Triggers are read and activated from the top down and so you are currently jumping to the next slide before changing the variable. Once the slide loses focus, all remaining triggers will not be activated and so your variable will not be changed.

    Reverse the order of the two triggers to solve your problem.

    • ElizabethDou037's avatar
      ElizabethDou037
      Community Member

      Thanks for replying. It was doing my head in.
      First time that I have used variables.

      Kind regards
      Elizabeth Douglas

  • For future reference: The fact that it wasn't displaying means that there was nothing in the variable.

    • ElizabethDou037's avatar
      ElizabethDou037
      Community Member

      Yes. I was thrown by it being my first use of a variable in SL. Makes total sense. THANKS

  • So I am using a trigger with a variable to display CC text. The CC button is working fine, but the text does not display. I moved the trigger to the top of the trigger list, but the text still does not display.  Hmmmm....any thoughts?

     

    • DavidSchwartz-f's avatar
      DavidSchwartz-f
      Community Member

      Hi Christina,

      Could you share the trigger that you are using? Are you using the built-in variable Player.DisplayCaptions when the button is clicked?