I just started programming and im practicing with the basics
Keep the four sides of collision seperate, e.g. have functions for collision being 2,3 and 4 as well. Also, rather than making your own variables for the width of something, just use sprite->stretchX. Also works with Y
I tried something like that and it didnt work the dude just flew aroud the map till he hit the corner
Im thinking of scraping the whole bush idea for now
i even tried this for each button and still no luck
if (osl_keys->held.down)
{
if ((sprite->x + spritewidth > bush->x) && (sprite->x < bush->x + bushwidth) && (sprite->y + spriteheight > bush->y) && (sprite->y < bush->y + bushheight))
{
sprite->y -= 4;
}
else
{
sprite->y += 2;
sprite_position = DOWN;
SpriteAnimate();
}
}