but that wouldnt make them equal. that would work somewhat, but it would have to be very precise to face left or right. i want it to check in the view shown in the picture. the enemy is the white block, and the different colored sections are the left right etc. so if link was in the red the zora would face up. this doesnt work if i just use the simple if link.y > y and x< whatever because it will always make the hitbox on one direction very very precise. Im asking for help on a segment of code that will sort of send out
if link.y > y
{
if link. x is in that red reigon than face up
if link.x is in the side reigons face to left/right
}
if link.y < y
{
if link.x is in the sides, face to the left/right
if link.x is in the yellow, face down.
}
so yes i have to check y and then check x, but there is more too it as sometimes x components can be shared in either but also y components can be shared in either, but never both.
EDIT:
Like this picture, they can all share an x component(10 back) and they all can share a y component(10 down)
but only one can have 10 back and 10 down as a coordinate in their region.
It also seems that the x and y have to equal, like if you are 10 over you have to be 10 down to be in one region, you cant be 12 down because that is in the lowest region