asollazzo
Member
Hi, im pretty new to the forums and GMS2 in general and am building my first game which is a hybrid tower defense / top down shooter. In the game the enemies are using a mp_grid to path through the level towards a goal and can react to walls being placed dynamically and adjust their path.
My problem comes with the path being blocked by a placed wall, i can make it detect when a wall has been placed that blocks the path and have it be deleted fine, but ideally i would when a potential placed wall will block the path that it will display as red before even placing it.
I cant figure out how to do it or even if it is possible.
Ive attached a pic of the game (all graphics are temporary) that shows a green square on the cursor indicating a potential wall placement in a position that will block the path for reference.
My problem comes with the path being blocked by a placed wall, i can make it detect when a wall has been placed that blocks the path and have it be deleted fine, but ideally i would when a potential placed wall will block the path that it will display as red before even placing it.
I cant figure out how to do it or even if it is possible.
Ive attached a pic of the game (all graphics are temporary) that shows a green square on the cursor indicating a potential wall placement in a position that will block the path for reference.