# how to add different sprites per level

**URL:** <https://forum.makecode.com/t/how-to-add-different-sprites-per-level/12828>\
**Category:** Help\
**Created:** [March 23, 2022, 7:14pm UTC](https://forum.makecode.com/t/how-to-add-different-sprites-per-level/12828 "2022-03-23T19:14:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fLAMEamino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flameamino/32/5989_2.png) [@fLAMEamino](https://forum.makecode.com/u/fLAMEamino)\
**Post date:** [March 23, 2022, 7:14pm UTC](https://forum.makecode.com/t/how-to-add-different-sprites-per-level/12828/1 "2022-03-23T19:14:26Z")

</div>

i am starting my first project and I’m trying to make a story game. whenever you advance to a new level, you have to talk to a new person and figure out more about the main character (aka you). i just learned how to make levels and how to continue to them, but I’m struggling on how to do the same with non-playable sprites and make them different per level. i imagine it’s a similar method to making levels, but I’m stumped with what variables to put, and how to put the actual characters and their designs into the game itself.

---

<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:** [March 23, 2022, 7:23pm UTC](https://forum.makecode.com/t/how-to-add-different-sprites-per-level/12828/2 "2022-03-23T19:23:09Z")

</div>

There are a few ways you can do this, but my favorite way is to create tiles for each NPC and place them in the tilemap.

First, create your tilemap w/ tiles for each NPC. Make sure you mark the NPCs as walls in the tilemap because that will be important for the code:

 ![Screen Shot 2022-03-23 at 12.18.30 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/97dfc3ea93cefb14a45f8ce9241b9fc07c665903.png)

Now use an “on sprite of kind player hits wall at location” block from the scene category to see if the player is colliding with one of your NPCs. If they are, you can show dialog or do whatever else (like loading a new map)

 ![Screen Shot 2022-03-23 at 12.18.43 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/34ba2b57fd0e0249bb77da487cb3a7fcdaabba89.png)

Here’s the sample code:

> **[autozone rpg](https://arcade.makecode.com/90664-97667-36013-40720)**
>
> 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:** [March 23, 2022, 7:24pm UTC](https://forum.makecode.com/t/how-to-add-different-sprites-per-level/12828/3 "2022-03-23T19:24:02Z")

</div>

Note that inside of the wall event, I dragged out the “location” variable from the top of the block!
