# How can I get column and row of sprite?

**URL:** <https://forum.makecode.com/t/how-can-i-get-column-and-row-of-sprite/7392>\
**Category:** Arcade\
**Created:** [April 15, 2021, 3:55pm UTC](https://forum.makecode.com/t/how-can-i-get-column-and-row-of-sprite/7392 "2021-04-15T15:55:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kunkka](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@kunkka](https://forum.makecode.com/u/kunkka)\
**Post date:** [April 15, 2021, 3:55pm UTC](https://forum.makecode.com/t/how-can-i-get-column-and-row-of-sprite/7392/1 "2021-04-15T15:55:28Z")

</div>

Please help me!

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [April 15, 2021, 4:03pm UTC](https://forum.makecode.com/t/how-can-i-get-column-and-row-of-sprite/7392/2 "2021-04-15T16:03:26Z")

</div>

In the tilemap extension:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c684d8125ba97ed34322940fdf7643af175bda1c.png)  
You can get a location of a sprite, and then get the columns and row of the location:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/183c2468417631d25c2df0674f82e59ccfc39628.png)

---

<div class="post-metadata">

**Author:** ![kunkka](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@kunkka](https://forum.makecode.com/u/kunkka)\
**Post date:** [April 16, 2021, 4:30pm UTC](https://forum.makecode.com/t/how-can-i-get-column-and-row-of-sprite/7392/3 "2021-04-16T16:30:23Z")

</div>

Thank you for your answer. I try to get location in this way, but the temp

 ![pic](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/fade910cc8a516574a8f33bcef49d03d1414bad9.png) value I get is null. Can you give me a test example? thank you very much.

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [April 16, 2021, 4:41pm UTC](https://forum.makecode.com/t/how-can-i-get-column-and-row-of-sprite/7392/4 "2021-04-16T16:41:49Z")

</div>

You need to set a tilemap before getting the location!

---

<div class="post-metadata">

**Author:** ![kunkka](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@kunkka](https://forum.makecode.com/u/kunkka)\
**Post date:** [April 18, 2021, 2:26am UTC](https://forum.makecode.com/t/how-can-i-get-column-and-row-of-sprite/7392/5 "2021-04-18T02:26:39Z")

</div>

Thank you very much for helping me solve this problem
