# Animate vs Legacy in On Game Update

**URL:** <https://forum.makecode.com/t/animate-vs-legacy-in-on-game-update/3587>\
**Category:** Help\
**Created:** [September 23, 2020, 12:13pm UTC](https://forum.makecode.com/t/animate-vs-legacy-in-on-game-update/3587 "2020-09-23T12:13:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![techahoynyc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/techahoynyc/32/1023_2.png) [@techahoynyc](https://forum.makecode.com/u/techahoynyc)\
**Post date:** [September 23, 2020, 12:13pm UTC](https://forum.makecode.com/t/animate-vs-legacy-in-on-game-update/3587/1 "2020-09-23T12:13:28Z")

</div>

I have another odd issue in my game and am wondering if anyone else can explain what is going on.

I am trying to animate my character when they are moving left or right and have found that the ‘animate’ blocks do not work the same as the ‘legacy’ blocks when they are placed within ‘on game update’.

I made a simple test to demonstrate:

> **[Animation Comparison](https://arcade.makecode.com/05459-15964-65615-33372)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

The ‘legacy’ blocks work, but the ‘animate’ blocks only start the animation after the character stops moving.

Any ideas? I can easily use the ‘legacy’ blocks, but it want to make sure I’m not overlooking some basic explanation.

@richard this might be another one right up your alley since you were so quick to answer my last question.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [September 23, 2020, 4:07pm UTC](https://forum.makecode.com/t/animate-vs-legacy-in-on-game-update/3587/2 "2020-09-23T16:07:44Z")

</div>

The animations in the new APIs reset when called multiple times. Instead of calling it every frame, you should only call it once when you start moving left or right:

 ![Screen Shot 2020-09-23 at 9.03.49 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/91d335b5a40f7c58b2409dc729bc683f6f189c0b.png)

Alternatively, I made an extension to make this sort of thing much easier. If you add this extension to your project:

```auto
riknoll/character-animations

```

You get blocks that capture this behavior along with a few other common scenarios:

 ![Screen Shot 2020-09-23 at 9.05.49 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/eb3020b8b92ae63e9106bd535db5116e636b4875.png)

It’s on my to-do list to get this in the default extension list.

---

<div class="post-metadata">

**Author:** ![techahoynyc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/techahoynyc/32/1023_2.png) [@techahoynyc](https://forum.makecode.com/u/techahoynyc)\
**Post date:** [September 23, 2020, 7:21pm UTC](https://forum.makecode.com/t/animate-vs-legacy-in-on-game-update/3587/3 "2020-09-23T19:21:52Z")

</div>

Nice extension! Using that now and thanks again for the explanation.

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [September 23, 2020, 7:53pm UTC](https://forum.makecode.com/t/animate-vs-legacy-in-on-game-update/3587/4 "2020-09-23T19:53:49Z")

</div>

> [@richard](#):
>
> ```auto
> riknoll/character-animations
> 
> ```

Thank you so much for this! it is exactly what I need!
