Forum Discussion
hello can anyone help i cant combine 2 variables and one
Bobur, some clarification. Is the video you are showing an example of what you are trying to accomplish?
When you say combine to variables into one, are you talking about numbers, characters, words? You mentioned combining two numbers into one but you could be talking about the characters of "1" and "3" for example.
Do the numbers need to add together (for example 1+3=4) or are you trying to concact (spelling?) them (for example 1 and 3 = 13)
To better understand variables, they are like empty containers or boxes. They can hold anything, but in Storyline usually just one thing. Like in algebra you can name a variable anything. The name of the variable and the content of the box may or not be related. It is easier to understand if they are.
Let's say you have a variable(container) named 10s_place and another named 1s_place. If you make the value of 10s_place ="1" and you made the value of 1s_place ="3" then you would want to multiply 10s_place by 10 prior to adding it to 1s_place.
In Storyline the triggers might look like this
Set 10s_place to value 1 when the timeline starts on this slide
Set 1s_place to value 3 when timeline starts on this slide
Set total_value to variable 10s_place
Multiply total_value by value 10
Add variable 1s_place to total_value
Using the above triggers you could get input from the user for the 1's place and the 10's place instead of assigning the values yourself. You might get input using a dial for each number, or a slider for each number, or a data entry input box. I've attached an example.
Hope this helps.
- SarahHodge2 years agoFormer Staff
Thanks for sharing your solution, Ron!