Forum Discussion
KrisTaylor-a3c1
12 months agoCommunity Member
How do i reset a variable to 0?
This is kind of a 3 part question. If I have a variable where it adds up the calories of food, I've noticed that every time I drop a food item onto a drop target it counts the calories as per the...
JudyNollet
12 months agoSuper Hero
For calculating, there needs to be a trigger for each math operation, as well as for resetting the variable when necessary.
Here's one way to do that:
- When any action happens that impacts the variable, have that action show a blank layer with a very short timeline.
- Have all the needed calculation triggers run when the timeline of that layer starts. The first trigger would reset the variable. That would be followed by triggers that perform a math operation on the variable (e.g., add to it) if the appropriate conditions are met.
- The final trigger on the blank layer should hide the layer when the timeline ends.
As for objects being difficult to click: transparent parts of a graphic aren't clickable. However, it's possible to make those areas clickable by editing the states. This post has more info: TIP: Making icons easier to program and easier to click | Articulate - Community
Related Content
- 2 months ago
- 12 months ago
- 2 months ago
- 12 months ago
- 12 months ago