# Using the timer to sequence actions

**URL:** <https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242>\
**Category:** Questions\
**Created:** [April 24, 2022, 7:30pm UTC](https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242 "2022-04-24T19:30:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Heller](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/steve_heller/32/3539_2.png) [@Steve\_Heller](https://cl.desmos.com/u/Steve_Heller)\
**Post date:** [April 24, 2022, 7:30pm UTC](https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242/1 "2022-04-24T19:30:59Z")

</div>

I’m trying to take two actions, with the second depending on the first’s completing. Someone gave me some tips on this last week, but I just can’t find the response. I have the text of their advice, but I can’t make it work. I stripped it down:

> **[Ticker for sequencing](https://www.desmos.com/calculator/xpzkvxfjtc)**
>
> Ticker for sequencing

I want s\_{etn} to trigger s\_{etm} which depends on s\_{etn} being done.

Thanks

---

<div class="post-metadata">

**Author:** ![pirsquared](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@pirsquared](https://cl.desmos.com/u/pirsquared)\
**Post date:** [April 24, 2022, 8:54pm UTC](https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242/2 "2022-04-24T20:54:57Z")

</div>

Is it this Facebook thread that you’re looking for?

> **[Desmos Educators | Facebook](https://www.facebook.com/groups/DesmosEducators/posts/4848656985261606/)**
>
> Desmos offers powerful software apps (such as our free graphing calculator) and interactive digital classroom activities to help students learn math and love learning math. Our pedagogy is designed...

As far as I can see, the example you’ve just shared works fine - when you press the action s\_etn, it updates n, sets Reset to 1, the ticker action picks that up and triggers s\_etm, which updates m and sets Reset back to 0. Is this different from what you were expecting?

---

<div class="post-metadata">

**Author:** ![Steve\_Heller](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/steve_heller/32/3539_2.png) [@Steve\_Heller](https://cl.desmos.com/u/Steve_Heller)\
**Post date:** [April 24, 2022, 9:26pm UTC](https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242/3 "2022-04-24T21:26:16Z")

</div>

Thanks.

Yes, I forgot about FB, but I had copied the contents of the advice. I spent a bunch of time searching this forum looking for it. ☹

The behavior you describe is what I am after. However, the example I shared doesn’t work for me. When I press s\_etn, n is set and r\_eSet is set, but s\_etm is not triggered and r\_eSet remains 1. When I click s\_etm explicitly, the expected behavior ensues: m is set and r\_eSet is set back to 0.

I’ve enabled actions in my configuration. Is there a timer enable config setting somewhere?

Also: would it be better to set r\_eSet back to 0 in the timer? That doesn’t work for me either, but if it did, which is cleaner/better style?

---

<div class="post-metadata">

**Author:** ![pirsquared](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@pirsquared](https://cl.desmos.com/u/pirsquared)\
**Post date:** [April 24, 2022, 9:49pm UTC](https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242/4 "2022-04-24T21:49:18Z")

</div>

It’s just that the ticker isn’t running in the version you’ve saved and shared. If you hit s\_etn, _then_ start the ticker going, everything should work. Then save the version with the ticker running.

In terms of cleanliness, I don’t think there’s a “best practice” as such, but I tend to like as little as possible in the Actions ticker (because there’s so little space) and as much as possible in the main graph. You can even put the conditions in the actions using a format like:  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/1/146741acaa067586c3d02d2c9ce90097dfd9ff3e.png)

but, really, on this scale I don’t think it makes any difference.

---

<div class="post-metadata">

**Author:** ![Steve\_Heller](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/steve_heller/32/3539_2.png) [@Steve\_Heller](https://cl.desmos.com/u/Steve_Heller)\
**Post date:** [April 24, 2022, 9:58pm UTC](https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242/5 "2022-04-24T21:58:09Z")

</div>

AHA! I didn’t know I had to “start the ticker”!!!

Thanks for your patience and kind advice!

---

<div class="post-metadata">

**Author:** ![Steve\_Heller](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/steve_heller/32/3539_2.png) [@Steve\_Heller](https://cl.desmos.com/u/Steve_Heller)\
**Post date:** [April 25, 2022, 12:37am UTC](https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242/6 "2022-04-25T00:37:20Z")

</div>

I like the idea of packing the flag detect and flag reset in the same line, presumably the line after the flag set. Then the flag variable can service several resets with different values, and the encoding can be local in the code. Here’s what I mean, perhaps obvious.

> **[Ticker for sequencing](https://www.desmos.com/calculator/sf9fo6basg)**
>
> Ticker for sequencing

Thanks!

---

<div class="post-metadata">

**Author:** ![pirsquared](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@pirsquared](https://cl.desmos.com/u/pirsquared)\
**Post date:** [April 25, 2022, 9:09am UTC](https://cl.desmos.com/t/using-the-timer-to-sequence-actions/4242/7 "2022-04-25T09:09:33Z")

</div>

> [@Steve\_Heller](#):
>
> AHA! I didn’t know I had to “start the ticker”!!!

It’s caught me out a few times too!

You’ve probably already discovered this, but each time you edit the ticker action, you also need to restart the ticker again after that (which makes sense but, again, often catches me out).
