# Tie Dye Beat Em Up 2 Problems with animation and something else

**URL:** <https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173>\
**Category:** Help\
**Created:** [September 23, 2021, 10:10pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173 "2021-09-23T22:10:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [September 23, 2021, 10:10pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/1 "2021-09-23T22:10:07Z")

</div>

I have a problem or two in my game.

The first one is that there is an enemy that falls from the sky, and it’s supposed to start walking when hits the ground… It does, but it’s animation is broken. It rapidly switches between the walking and falling animation.

The second bug is that my game just randomly crashes and pauses. I can’t find the cause because it isn’t consistent when it happens.

Anyone have a solution?

---

<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, 2021, 10:10pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/2 "2021-09-23T22:10:18Z")

</div>

can you share your code?

---

<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 24, 2021, 3:57pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/4 "2021-09-24T15:57:30Z")

</div>

Here’s a gif showing how to create a share link:

![2021-09-24 08.56.00](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/be292f67464e6182dc7e28027aa137ce722e0f34.gif)

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [September 24, 2021, 5:22pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/5 "2021-09-24T17:22:20Z")

</div>

Ok!

> **[TieDye Beat Em Up 2](https://arcade.makecode.com/66417-54653-39408-06571)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<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 24, 2021, 6:47pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/6 "2021-09-24T18:47:54Z")

</div>

For the first problem:

This is probably an issue with your animations. Make sure when you write animations for a sprite, these two things are true:

1. Every animation is the **same size** as the original sprite
2. Every frame of the animation is **aligned to the bottom** of the image

I think #2 is probably your issue. If they aren’t aligned to the bottom, then the sprite will start to fall when the image changes. Take a look at this example to see what I’m talking about:

> **[align-to-bottom-example](https://arcade.makecode.com/38919-20575-54560-26377)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<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 24, 2021, 6:49pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/7 "2021-09-24T18:49:39Z")

</div>

For the second one, there isn’t much I can do to help without some way to make the bug happen. Generally for crashing bugs it’s useful to play your game with the debugger on. That way when the crash happens it will highlight the block that caused the issue. To turn on the debugger, press the bug icon underneath the simulator.

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [September 24, 2021, 7:28pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/8 "2021-09-24T19:28:01Z")

</div>

Oh wait! I forgot to mention that I used an extension called “character” to make the animations. It’s kind of like states like not moving do this animation or facing up do this animation sort of thing.

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [September 24, 2021, 7:28pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/9 "2021-09-24T19:28:02Z")

</div>

And it keeps switching between the moving left/right state and moving down state

---

<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 24, 2021, 7:28pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/10 "2021-09-24T19:28:50Z")

</div>

Yep! Both of the things I said are also true for the character extension! If you have any questions about that extension, let me know (I wrote it)

---

<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 24, 2021, 7:32pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/11 "2021-09-24T19:32:34Z")

</div>

Here’s the same example using the character extension instead:

> **[align-to-bottom-example (character extension)](https://arcade.makecode.com/83413-02020-92869-07061)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [September 24, 2021, 7:54pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/12 "2021-09-24T19:54:15Z")

</div>

oh! cool! Ok thank you!

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [September 24, 2021, 7:54pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/13 "2021-09-24T19:54:18Z")

</div>

And that is EXACTLY what is happening to the enemy! wow!

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [October 4, 2021, 4:06pm UTC](https://forum.makecode.com/t/tie-dye-beat-em-up-2-problems-with-animation-and-something-else/10173/14 "2021-10-04T16:06:33Z")

</div>

I found what was making the game crash, something to do with projectiles. Fixed it!
