# Trouble getting correct count to show up at the right time

**URL:** https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854
**Category:** Questions
**Created:** [November 22, 2021, 6:44pm UTC](https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854 "2021-11-22T18:44:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Jeff\_Holcomb](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeff_holcomb/32/433_2.png) [@Jeff\_Holcomb](https://cl.desmos.com/u/Jeff_Holcomb)
#### Post date: [November 22, 2021, 6:44pm UTC](https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854/1 "2021-11-22T18:44:33Z")

</div>

I want the correct count to update when the animation finishes but the S has to click “Try Another” in order for it to update. Not sure what I am missing, yet!

> **[Practice with 90˚ Rotations • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/619be315a6c1b309d9a1d2a9)**
>
> by Jeff Holcomb

---

<div class="post-metadata">

### Author: ![Raj](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/raj/32/5127_2.png) [@Raj](https://cl.desmos.com/u/Raj)
#### Post date: [January 11, 2022, 1:54pm UTC](https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854/2 "2022-01-11T13:54:42Z")

</div>

I don’t have an answer for you, sorry, but I do have the same problem, so I’m curious whether you ever found out an answer or workaround for this?

I would also like to initiate a series of events without forcing the user to click on something, and I haven’t figured out yet how to do that. Requiring the user to click in order to make the action happen is ok, but it’s clunky, and it makes the whole activity less flowing and fun.

Raj

---

<div class="post-metadata">

### Author: ![Jeff\_Holcomb](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeff_holcomb/32/433_2.png) [@Jeff\_Holcomb](https://cl.desmos.com/u/Jeff_Holcomb)
#### Post date: [January 11, 2022, 2:48pm UTC](https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854/3 "2022-01-11T14:48:45Z")

</div>

Ha! I can’t even recall writing that! Oh my, what a year. I’ll see what I can remember today 🙂

---

<div class="post-metadata">

### Author: ![Raj](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/raj/32/5127_2.png) [@Raj](https://cl.desmos.com/u/Raj)
#### Post date: [January 11, 2022, 8:31pm UTC](https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854/4 "2022-01-11T20:31:23Z")

</div>

Thanks! It has indeed been quite a crazy year (alas!).

So far all I figured out is that time-ticker events can also trigger actions, and they don’t need the user to make a mouse-click. However, the ticker’s progress is not always going to map easily onto the action that you want. It doesn’t for me, in this instance.

---

<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: [January 11, 2022, 8:48pm UTC](https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854/5 "2022-01-11T20:48:34Z")

</div>

What, precisely, are you aiming to do? You can often use the ticker to run actions with conditions to get those actions to only fire under certain circumstances.

---

<div class="post-metadata">

### Author: ![Raj](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/raj/32/5127_2.png) [@Raj](https://cl.desmos.com/u/Raj)
#### Post date: [January 12, 2022, 12:31am UTC](https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854/6 "2022-01-12T00:31:17Z")

</div>

I’m trying to make a space invaders game to teach angles. Here’s the activity:

> **[Space invaders, radians edition • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/61dc8a4528017d0a4e98e5da)**
>
> by Mr. Raizada

and here’s a tweet with an animated gif of it:

> <https://twitter.com/raj_raizada/status/1481008852573331465>

Currently, after the player has successfully blasted a space invader, they need to click on some text in order to increment the score and bring out the next invader. That’s a bit clunky. I’d prefer to have this happen without needing any user-click, but my attempts to use the clicker to do this have not worked yet.

Any help greatly appreciated!

Raj

---

<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: [January 12, 2022, 8:59pm UTC](https://cl.desmos.com/t/trouble-getting-correct-count-to-show-up-at-the-right-time/3854/7 "2022-01-12T20:59:25Z")

</div>

Something like this should do the trick:

> **[SpaceInvaders](https://www.desmos.com/calculator/h2sf4f2jgu)**
>
> SpaceInvaders

Essentially, I’ve:

- introduced a new variable called d\_elay
- moved the actions that were previously in the clickable “Score!” text into a variable called N\_ext
- set d\_elay to increase in the ticker whenever w\_on=1
- set N\_ext to run whenever d\_elay reaches 10

N\_ext also sets d\_elay back to zero, for obvious reasons.

There may be a more elegant solution than this but it seems to do the trick, and is hopefully self-explanatory enough if you want to tweak the length of the delay.

I really like this activity, by the way. The pace of the game is brutal on “faster”! 🤣
