Array Variable

hvaughan-2540
Community Member Posts: 156 ✶ 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...]
Button1var=1, Button2var=1, Button3var=1...
or
Buttons[1,1,1...]
Tagged:
Flag
0
Comments
-
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
Categories
- 4.8K All Categories
- 6 New Feature Releases
- The Training Arcade®
- Arcades™
- 125 ✫ Announcements
- 9 ✪ Contests
- 34.1K eLearning Brothers® Products
- 33.6K Lectora®
- 31.6K Lectora Discussions
- 1.9K Lectora Feature Requests
- 71 Lectora User Groups
- 17 Asset Library
- 10 AssetLibrary Discussions
- 7 AssetLibrary Feature Requests
- 305 CenarioVR®
- 179 CenarioVR Discussions
- 126 CenarioVR Feature Requests
- 41 Rockstar Learning Platform®
- 29 Rockstar Learning Platform Discussions
- 12 Rockstar Learning Platform Feature Requests
- 4 Off-the-Shelf Course Library
- 3 Off-the-Shelf Course Library Discussions
- 1 Off-the-Shelf Course Library Feature Requests
- 114 CourseMill®
- 107 CourseMill Discussions
- 44 ReviewLink®
- 32 ReviewLink Discussions
- 12 ReviewLink Suggestions
- 2 The Training Arcade®
- 1 The Training Arcade Discussions
- 1 The Training Arcade Feature Requests
- 10 Additional Learning Products
- 2 Adobe®
- 4 Articulate®
- 2 Camtasia®
- Docebo®
- 1 iSpring®
- 1 Microsoft® PowerPoint®
- 932 All Things eLearning
- 5 Course Development Showcase
- 1 eLearning Brothers® Downloads
- 1 Compliance Training
- 11 eLearning Development
- eLearning Game Design
- 7 Instructional Design
- 545 Learning Management System (LMS) Integration
- 3 Mobile Learning
- 22 Visual Design
- 331 Web Accessibility
- 1.2K ♪ The Green Room
- 8 ♡ Community Feedback
- 7 Community Tips