Array Variable

hvaughan-2540 Community Member Posts: 161 ✶ 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...
0 votes

Open For Voting · Last Updated


  • carlfink
    carlfink Community Member Posts: 1,102 ✭ Legend ✭
    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, Administrator, Rockstar Manager Posts: 115 eLearning ROCKSTAR Admin Team
    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