R
ruwcom
Guest
So I made a state where you grab an enemy and throw it away, this happens when the character is directly in front of the enemy, touching it, this works fine but when I'm walking over them, having the foot of the character touching the enemy, the code detects a collision and activates the throw state, how can I make it so it only activates when it's in front and in the center of the enemy?
The code looks like this right now
-24 is so it react in the center and "dir" is so it detects where the character is facing.
The code looks like this right now
Code:
if (place_meeting(x-24*dir,y,obj_enemy))
{
state = scr_throw;
}