P
PopatoChisp
Guest
Hi, I'm making a mouse-click controlled game, and I want the player to not be able to click on certaine spots because they are not walkable.
I think I may have an idea how to start that in the Mouseclick object (it creates a little arrow that shows where the player goes when pressing the LMB, and the player object moves towards it after it is createt and then the sprite goes transparent on meeting)
but I'm not really sure how to continue.
I don't want to deactivate the object completly because the player should still be able to click on the
walkable parts of the room, but I don't really know what else to do.
I think I may have an idea how to start that in the Mouseclick object (it creates a little arrow that shows where the player goes when pressing the LMB, and the player object moves towards it after it is createt and then the sprite goes transparent on meeting)
Code:
if (place_meeting(x,y,obj_NoWalk))
I don't want to deactivate the object completly because the player should still be able to click on the
walkable parts of the room, but I don't really know what else to do.