Hello, I’ve run into an issue getting a certain event to work properly.
I’m working on a game with tile-based movement, and have set up events that allow for this. Currently, Player moves in all cardinal directions as desired. Now, I’m trying to start implementing walls in my game, which should prevent Player from being able to move into their tile. (Player and each Wall is exactly 1 tile large)
In order to stop movement into Walls, I’ve set up the move event in the following way: if there is no Wall in the space that Player is attempting to move into, then allow Player to move into that space. I’ve set it up inside the “w key is pressed” event for now.
However, when I try running this code, movement isn’t stopped by Walls at all, and Player can move as though this condition doesn’t exist. On the other hand, when left un-inverted, the condition works as I would expect: Player can only move up if a Wall exists above them.
Have I implemented the event incorrectly? Does the inversion of “point inside object” not work as I’m trying to implement it? I can think of alternative ways to implement this behavior, I’d just like to know how this specific condition works.
Here’s a picture of the events I’ve set up:
And here’s a .zip of the project if it’s needed:
Thank you, any help is appreciated.