B
bilouw
Guest
Hi guys,
I have a tile collision system who works fine. Just a little problem, when i use the function tilemap_get_at_pixel, combined with the function tile_get_index, the return value is fine (1, 2, 3 in fonction on the tile i am), but sometimes it returns number like "41, 23", but i don't have tile with this index, so the game crash, because or array out of range. Do you see why?
the code :
var pos = tile_get_index(tilemap_get_at_pixel(tilemap, _x, _y));
Thanks.
I have a tile collision system who works fine. Just a little problem, when i use the function tilemap_get_at_pixel, combined with the function tile_get_index, the return value is fine (1, 2, 3 in fonction on the tile i am), but sometimes it returns number like "41, 23", but i don't have tile with this index, so the game crash, because or array out of range. Do you see why?
the code :
var pos = tile_get_index(tilemap_get_at_pixel(tilemap, _x, _y));
Thanks.