Pir Jacques
Member
SOLVED: For anyone reading this who is having the same issue of the Debug menu not evaluating tile functions, the solution is simple: the Debug menu shows false results for these functions. You can still use them in code as normal, and they will work perfectly fine.
I just recently moved from GM8.1 to GM:S2 (due to not having a license for 8.1...), and I'm working on getting my current project copied over. In my original project, I had a nigh-perfect tile-based collision system which depended on the old tile_layer_find function. Upon doing my homework, I've found out about the new function that I need to serve that same purpose, tilemap_get_at_pixel, and that it requires the ID of the tilemap in the layer to function, which can be gotten by using layer_tilemap_get_id. However, when I try to make the new collision system, the game cannot perform the collisions, and, after tracking a few things in the Debug's Watch section, I've found out why: for some reason, the game is not evaluating layer_tilemap_get_id. I would like to know why.
The function I'm testing in the debugger is as follows:
layer_tilemap_get_id ("layer_walls")
layer_walls being the name I've given to the layer holding my wall tiles.
I've checked the spelling on the layer name several times, to no avail; I've tried using layer_get_id instead, and it encounters the same issue; I've tried removing the string quotations, which just crashed the game (expectably); I've even tried renaming the layer- all to no avail. If anyone has an idea what I'm doing wrong, I'd love to hear it so that I can carry on past this roadblock. I simply want to understand what I'm doing wrong with this function so that I may use it correctly.
Thank you kindly!
~Pir
I just recently moved from GM8.1 to GM:S2 (due to not having a license for 8.1...), and I'm working on getting my current project copied over. In my original project, I had a nigh-perfect tile-based collision system which depended on the old tile_layer_find function. Upon doing my homework, I've found out about the new function that I need to serve that same purpose, tilemap_get_at_pixel, and that it requires the ID of the tilemap in the layer to function, which can be gotten by using layer_tilemap_get_id. However, when I try to make the new collision system, the game cannot perform the collisions, and, after tracking a few things in the Debug's Watch section, I've found out why: for some reason, the game is not evaluating layer_tilemap_get_id. I would like to know why.
The function I'm testing in the debugger is as follows:
layer_tilemap_get_id ("layer_walls")
layer_walls being the name I've given to the layer holding my wall tiles.
I've checked the spelling on the layer name several times, to no avail; I've tried using layer_get_id instead, and it encounters the same issue; I've tried removing the string quotations, which just crashed the game (expectably); I've even tried renaming the layer- all to no avail. If anyone has an idea what I'm doing wrong, I'd love to hear it so that I can carry on past this roadblock. I simply want to understand what I'm doing wrong with this function so that I may use it correctly.
Thank you kindly!
~Pir
Last edited: