I would love to find the solution to summing 3 variables into 1 number that would trigger an image to display. Very simple quiz that adds these numbers then displays a specific result. I am not a script or code guy and I am trying to keep this as simple as possible. Any ideas? I have read a number on entries but nothing fits exactly. Working with BrightAuthor connected. thanks
8 comments
-
Bright Scripters Adding two variables a, b, would be the same as adding 1 to a, repeating the process b times.
You can use the increment command, combined with conditional targets to end the process.
-
Doug Thank You for the quick response. I should have shared this matrix that is 3x3. If I increase or decrease I get the same value on multiple occasions. Each sum has to be unique in order to display the corresponding slide. I created the second matrix which results in no duplicates but I cannot add them together.


-
Bright Scripters Could you provide more details and context?
-
Doug This is for a museum interactive on picking a job. You pick one square from each vertical row and those three items added together give you a specific number and that is the job. Adding all those squares together provide for 27 different choices for jobs. again pick one item from each vertical row those three items added together, then display a specific job .
-
Doug I forgot to mention, after the 3 choices have been made an “apply for job” button at the bottom of the matrix is pressed. This takes the sum, processes it through an event handler and if it equals a specific number displays the best job slide.
-
Bright Scripters Instead of summing numbers, you could concatenate strings.
Your matrix could look like so:
1 (1) 1
(2) 2 2
3 3 (3)
If the user selects the numbers in parenthesis, the combination would give you a concatenated string 213, which you can then compare with a known string.
The matrix could be made of letters too, like:
a (a) a
(b) b b
c c (c)
With letters we would get the string "bac".
Or with underscore as separator, we would get "b_a_c".
Here is how to concatenate strings which are stored in user variables.
Let's assume that each selection would assign a string to a variable and you'll have 3 variables, one for each selection.
Variables could be s1, s2, s3.
Concatenation the 3 variables with underscore as separator in BA is like so:
$$s1$$_$$s2$$_$$s3$$
In BA Connected, concatenation is slightly different but works the same way:
{{s1}}_{{s2}}_{{s3}}
I hope that helps
-
Doug Thank You for the reply and the options but, I have absolutely no idea on how to use this information. I am guessing that I need some other type of brightscript and find some way to assign a string to the variables. Looks like I need to do some research but I find it interesting that there is not an easy way to add the variables together. Thanks.
-
Bright Scripters For us to better assist, you are welcome to email your presentation file ( .bpf / .bpfx ) to info@brightscripters.com.