eLBX Online 2021 | June 22 - 24


Join us for a FREE, 3-day virtual conference featuring industry experts and eLearning thought leaders. Learn about critical topics such as eLearning accessibility, learning experience design, course authoring, virtual reality, and gamification. Register today!
CHECK IT OUT

Array Variable

hvaughan-2540
hvaughan-2540 Community Member Posts: 131 ✶ Headliner ✶
Any chance of adding an array variable? This would reduce the amount of variables needed in a CVR project. e.g. If I have tick icons which are set to visible when buttons are clicked I need a new variable for every tick icon. Far better and tidyier to have one array for all.

Button1var=1, Button2var=1, Button3var=1...
or
Buttons[1,1,1...]
Tagged:
0
0 votes

Open For Voting · Last Updated

Comments

  • carlfink
    carlfink Community Member Posts: 882 ♦ Idol ♦
    If you add arrays, you need (for me as customer) to add scripting with actual code, which I don't see ELB doing.
  • johnb
    johnb Community Member, Rockstar Manager Posts: 56 ☆ Superstar ☆
    One thing I use for situations where I have many options and don't want to create multiple variables is a "flags" variable. Lets say I have 5 buttons I want to track, I when button 1 is hit, I add 1 to the variable, when button 2 is hit, I add 20 to the variable, when button 3 is hit, I add 300 to the variable, button 4, add 4000, button 5, add 50000. Then you can test to see if all of them are hit by testing for 54321, or you can test for any particular button by seeing if the variable contains that number (if it contains a 3, button 3 was hit) You can do this because variables can be treated as both strings and numbers.

    Of course, you can always just put in multiple conditions to see if a hotspot "has been selected" also
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!