T
Thunder025
Guest
Working on a simple 2d platformer, with a mechanic where enemies can be grappled. So far all going well, though I made it so that if while the player is grappling an enemy and they take a hit from another enemy, they're supposed to be knocked back and release the enemy. With how this currently works, occasionally released enemies will be placed in a wall, unable to move.
I'm just looking for a simple fix for this, such as an event for collision between the enemy and a wall/ground object, where the enemy is moved up one pixel as long as they're in collision to get them up out of the wall/ground. For some reason however, this isn't currently working (presumably because I have "solid" checked for the wall/ground objects, but I need this option checked as otherwise when my player recieves knockback, they will sometimes be knocked into a wall, unable to escape).
Is there a different block of code I can use or a way to make my current setup work? Don't need anything too complex, just something that moves enemy objects up if they are stuck in the ground.
I'm just looking for a simple fix for this, such as an event for collision between the enemy and a wall/ground object, where the enemy is moved up one pixel as long as they're in collision to get them up out of the wall/ground. For some reason however, this isn't currently working (presumably because I have "solid" checked for the wall/ground objects, but I need this option checked as otherwise when my player recieves knockback, they will sometimes be knocked into a wall, unable to escape).
Is there a different block of code I can use or a way to make my current setup work? Don't need anything too complex, just something that moves enemy objects up if they are stuck in the ground.