mymap.get(x,y) function not recognizing the right tiles
Hi I'm trying to add a collision element to prevent the player from passing through certain blocks. I have added all the blocks onto a tile sheet and made the map using that sheet with the hopes of using mymap.get(x,y).startsWith("sheet") to detect which block to stop in front of and which ones to pass through. However, when I try using mymap.get(x,y), it returns 0 as the player moves across the map even though the map is completely filled with different sprites. I used the coordinates of the player as the arguments in the get method and have confirmed that variables I passed through does reflect the player's coordinate, so i'm not really sure what else could be the problem. I don't know if it's because I made the tile sheet wrong?