Hello, ill make this short because this whole idea is decently short. so my characters mask is very small, and i am using something like if Link.x = x then blahblah. the whole code is in the spoiler and you can see it there. my question is: is there a way to make something like if link.x is = with a tolerance or giveway of like 3 or something. my code also uses > and < so it gets confuzing as you can see i tried something there to replicate my idea. if anyone has a way to go about this, help would be appreciated.
CODE:
Show content
///////////////DIRECTION(LEFTANDRIGHT)
///////////////
if Link.y = y and (Link.x+3 < x+3 or Link.x-3 < x-3)
{
alarm[1] = true
sprung = true
}
if Link.y = y and (Link.x+3 > x+3 or Link.x-3 > x-3)
{
alarm[4] = true
sprung = true
}
///////////////OTHER DIRECTION(UPANDDOWN)
///////////////
if Link.x = x and Link.y < y
{
alarm[7] = true
sprung = true
}
if Link.x = x and Link.y > y
{
alarm[10] = true
sprung = true
}