Forum Discussion
Variable - Not working
Hi,
Why is variables in my attached file not working?
Regards
Malvika
- elizabethPartner
You didn't say which variable isn't working, but if you're referring to the Christmas Carol in scene 3, you need to add states to the snowglobe character and the snow globe scene. Then change the state of that character to correspond with each option if Character variable = (whatever that character's variable is) and Scene = . Your current triggers are set so that you have a trigger that says to set the character variable to a number when the character variable equals that number, and same with settings. You're trying to set a variable with a variable. Your character and your setting need states, and you need to change the state of those objects when the variable = .
Hope that helps!
- MalvikaMalho044Community Member
Hi Elizabeth,
In slide 3.6, I have variables set for Character and Setting, for music I am not sure how to work out various combinations.
Also, I want output in slide 3.6 to change as per character and scenes change.
How can that be done?
Regards
Malvika
- Articulate-TeamCommunity Member
Hi, below an example of how to do it with one character, one background and one music (Racoon, City Park and Let it snow). I only left what is needed. The rest need to be deleted and new variables created following the same approach. You need to finish the layer for Let it snow with all the variables, states for the 2 images and once ready copy and change the name and music for the rest. You need to create all the states for the character and background. If you do all this steps will work. Good luck and let me know if more help is needed.
- MalvikaMalho044Community Member
Hi,
I do need additional help. I am attaching both my file and the file while inspired the project.
It will be great if you could help me identify where am I going wrong.
Regards
Malvika
- Articulate-TeamCommunity Member
Hi,
The issue lies in not establishing states for both the character image and the background image. To address this, create states for each character and background, and implement triggers that change the displayed image based on user clicks. For example, on slide 1.3, when clicking the Grey Tabby character assigns a value of 2. Then, on slide 1.6, set the state of image9.emf with an action specifying to change it to state 2. Ensure that you've created states for all characters and backgrounds previously. In the file I have shared before i did the same thing with a similar approach, the key is to create all states for the image of the character and the background. See screenshot attached. I hope this helps!
- MalvikaMalho044Community Member
Got the point. I added states, music changes but settings and characters do not change. Why so?
Regards
Malvika
- WaltHamiltonSuper Hero
Think this trigger through for a minute.
Do you really want to set the value of the variable Character to 1 if the value of the variable Character is already 1?
Two suggestions. When troubleshooting, walk through every step of a trigger, and ask what does this cause the system to do, and is that what I want?
This confusion is probably caused by using "Character" for the name of both the variable, and the image. Try names that can't be easily confused, like "characterVariable" and "characterImage".
Once you get the names straightened out, instead of
,
try
Set state of characterImage to state 3
When the timeline starts on this slide
If characterVariable = 3
Make the same changes for the names and triggers on the settings, then on the base of slide 1.6, give the oval different states, like you did for image9.emf.
Finally, go to each audio layer, and delete image9.emf and the oval, so that the changes on the base layer can be seen.
- MalvikaMalho044Community Member
Got the point, and thank you for identifying the error.
P.S - I wish I could work with you someday. When master is expert, student is bound to learn.
- Articulate-TeamCommunity Member
Hi Malvika,
I fixed the triggers for the Characters, they are working, now you have to match what I did with the background, in the oval on slide 1.6 create the states for CityPark, Cabin, etc. And the action should be that the state of the oval changes to the corresponding one when they are selected. I will not use tha same numbers for them as you used for the Characters, as they will get mixed. So go back to slide 1.4 and assign different values. Then go to slide 1.6 and set the state of the oval to for example CityPark if = value 10 (do not use form 1 to 9) as above mentioned it is always better to have other ways to call the variables. Finally, the problem with the Characters's trigger was that you were not saying that the image changes, you were saying that the variable changes. One thing is the variable and other thing is what happens when a variable changes. I hope this helps.
- WaltHamiltonSuper HeroYou're welcome. PIAWYC (Pass it along when you can).Keep working and practicing. Come on to the forum, and try to find an answer to questions people ask. Keep reading forum posts and asking questions, and you will get better.