Forum Discussion
Create a variable for object interaction?
I've created an interaction with states that change when the learner clicks on each cup. They can click 4 times until the cups are full. What I want them to be able to do is empty one level when the other cup is filled by one level in this way, they will interact with each other. I have no idea how to do this, but I'm presuming some combination of variables can achieve this. Is this at all possible?
See attached.
Not sure if this is what you want, but here's a simple version of adding and subtracting from the objects.
https://360.articulate.com/review/content/f8fa0b58-6170-4358-bc80-c803d6fa4dcd/review
- deborahrivera-9Community Member
this is exactly what I need. But I missed the part where you created the variable... I created a coach variable with type of 'number' , default value of 4. But how can I link that to the actual cup?
- deborahrivera-9Community Member
Could you also provide the file where you made these changes? It helps me to deconstruct what you did by examining the states and triggers.
I had to redo the file since I didn't save it and did a new tutorial as I was walking through it.
- deborahrivera-9Community Member
Thank you so much for taking the time! I think your steps are much more comprehensive than what I was trying to do with states and triggers. I appreciate it:-)
- deborahrivera-9Community Member
Just to see if I understand it correctly:
When I click on coach, it adds 1/4. At the same time, you want coachee to decrease by 1/4. And if I click on coachee it adds 1/4 and at the same time coach decreases by 1/4.
So it's like the pass 1/4 back and forth based on what's clicked?
Is there a starting point for each? For example, they each start at half or full? Or do they start empty?
- deborahrivera-9Community Member
They both start empty.
You're welcome. Glad to help.