Hey there. I am trying to create a GB style zelda game in Gamemaker, but one problem that I have is trying to create enemies that can be pushed back when hit or be pushed back when hit by an enemy. What I mean is that when you strike an enemy wih your sword, or get hit yourself, you get pushed back. But the problem with this is that my own attempts do not take not of collisions with solid objects.
Another method I have tried is to check if the position from a certain distance is free and jump to that point, but there is likely something better out there and this method is not perfect. I am aiming for something similar to the GB style games, obviously.