# Need help on sprites on tilemaps

**URL:** <https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573>\
**Category:** Help\
**Created:** [September 21, 2020, 7:15pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573 "2020-09-21T19:15:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 21, 2020, 7:15pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/1 "2020-09-21T19:15:51Z")

</div>

I’m creating this adventure-like game and I wanna put different sprites you can interact with on the different maps but I don’t wanna overuse the “set sprite location at a certain place” block. I can try using this code shown on the image but I don’t know if it would work with sprites bigger than 16x16. Any comments? ![Screenshot 2020-09-21 at 12.14.23 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/e236d30466e4d85397ee6b772a242ee1c7d5bdbd.png)

---

<div class="post-metadata">

**Author:** ![FlintAsher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flintasher/32/2745_2.png) [@FlintAsher](https://forum.makecode.com/u/FlintAsher)\
**Post date:** [September 21, 2020, 7:19pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/2 "2020-09-21T19:19:50Z")

</div>

I do believe that it will work being as i used the same code to spawn my enemies, so it should work, and you already have a good multi level function???

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 21, 2020, 7:22pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/3 "2020-09-21T19:22:01Z")

</div>

Thank you, i’ll try it out, and i’m working on one at the moment!!

---

<div class="post-metadata">

**Author:** ![FlintAsher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flintasher/32/2745_2.png) [@FlintAsher](https://forum.makecode.com/u/FlintAsher)\
**Post date:** [September 21, 2020, 7:23pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/4 "2020-09-21T19:23:26Z")

</div>

Great!!! If it doesn’t i’ll try to help you fix it! I look forward to seeing your game and playing it! 👍

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 21, 2020, 7:27pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/5 "2020-09-21T19:27:50Z")

</div>

It worked! thank you!!! 😊

---

<div class="post-metadata">

**Author:** ![FlintAsher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flintasher/32/2745_2.png) [@FlintAsher](https://forum.makecode.com/u/FlintAsher)\
**Post date:** [September 21, 2020, 7:28pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/6 "2020-09-21T19:28:24Z")

</div>

_claps_ Noice 👌

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 22, 2020, 9:53pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/7 "2020-09-22T21:53:24Z")

</div>

So I came across another problem where if I try to change the tilemap then it won’t remove the previous sprites. How would I fix that? and also how would I be able to move back and forth between different tilemaps?

---

<div class="post-metadata">

**Author:** ![FlintAsher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flintasher/32/2745_2.png) [@FlintAsher](https://forum.makecode.com/u/FlintAsher)\
**Post date:** [September 23, 2020, 3:04pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/8 "2020-09-23T15:04:41Z")

</div>

You would need to create a function called clearLevel, and set it to be called on the start of each new level and set it to destroy all existing enemy sprites.

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 23, 2020, 3:15pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/9 "2020-09-23T15:15:45Z")

</div>

I’ll try that then!! but what about switching between maps? cause this isn’t really a level kinda game but more of exploration!!!

---

<div class="post-metadata">

**Author:** ![FlintAsher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flintasher/32/2745_2.png) [@FlintAsher](https://forum.makecode.com/u/FlintAsher)\
**Post date:** [September 23, 2020, 3:20pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/10 "2020-09-23T15:20:21Z")

</div>

You can use something like this to change maps.  
 ![Screenshot 2020-09-23 at 8.17.45 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2e2ef9f37fa0867a9f05dbecd4e0733aadf07f4a.png)  
and then put this in on start  
 ![Screenshot 2020-09-23 at 8.17.57 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/20b8bc441ec075f0c8f37695b6e29e2757fbc8cd.png)  
and then this is for what you’re using to end the current map  
 ![Screenshot 2020-09-23 at 8.19.39 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b85c59992db14a3b83e1c57eb60c65b02772c005.png)  
You’ll have to make a variable setting the currentLevel to zero in the onStart.

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 23, 2020, 3:22pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/11 "2020-09-23T15:22:42Z")

</div>

I’ll try it out, when I do then i’ll update saying whether it worked or not! Thank you btw!

---

<div class="post-metadata">

**Author:** ![FlintAsher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flintasher/32/2745_2.png) [@FlintAsher](https://forum.makecode.com/u/FlintAsher)\
**Post date:** [September 23, 2020, 3:22pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/12 "2020-09-23T15:22:57Z")

</div>

Glad to help!

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 24, 2020, 2:39am UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/13 "2020-09-24T02:39:25Z")

</div>

update! It worked and now I’m in the middle of making the tilemaps look nice!!!

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [September 24, 2020, 5:44pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/14 "2020-09-24T17:44:17Z")

</div>

Is that pic from Among us? I love that game

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 24, 2020, 6:02pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/15 "2020-09-24T18:02:33Z")

</div>

yes ![Cyan](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/fd940d7fe1e879847c85abdc1babf3d45a5f3f6c.png)

---

<div class="post-metadata">

**Author:** ![Kat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kat/32/2596_2.png) [@Kat](https://forum.makecode.com/u/Kat)\
**Post date:** [September 24, 2020, 6:44pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/16 "2020-09-24T18:44:25Z")

</div>

The Among Us players kinda look like toes to me 😕

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 24, 2020, 7:01pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/17 "2020-09-24T19:01:05Z")

</div>

oh my god i-

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [September 24, 2020, 7:08pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/18 "2020-09-24T19:08:21Z")

</div>

Wrong!

It looks like an axolotl in a toe costume painted red, unpainted, then painted cyan. Then it got swelling on its toenail.

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [September 24, 2020, 7:09pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/19 "2020-09-24T19:09:17Z")

</div>

Chad.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/400c3c7b4c90eb42fbd5d1f6681ba74b62e14346.png)

---

<div class="post-metadata">

**Author:** ![UnderwaterAstronaut](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/underwaterastronaut/32/2228_2.png) [@UnderwaterAstronaut](https://forum.makecode.com/u/UnderwaterAstronaut)\
**Post date:** [September 24, 2020, 7:31pm UTC](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573/20 "2020-09-24T19:31:24Z")

</div>

chad.

[Next page](https://forum.makecode.com/t/need-help-on-sprites-on-tilemaps/3573.md?page=2)
