Reply to Re: Touching!
If you don't have an account, just leave the password field blank.
loop:
wait(100);
int &x = sp_x(&sprite, -1);
int &y = sp_y(&sprite, -1);
int &box = inside_box(&x, &y, left, top, right, bottom);
//left, right etc set as touch area
if (&box)
{
//do stuff
}
goto loop;
Or if it's a straight area (like a wall) you could just use sp_x/y() instead of inside_box()...
loop:
wait(100);
&x = sp_x(&sprite, -1);
if (&x > ??)
{
//do stuff
}
goto loop;
...Heh, posted at the same time as Rabid.
wait(100);
int &x = sp_x(&sprite, -1);
int &y = sp_y(&sprite, -1);
int &box = inside_box(&x, &y, left, top, right, bottom);
//left, right etc set as touch area
if (&box)
{
//do stuff
}
goto loop;
Or if it's a straight area (like a wall) you could just use sp_x/y() instead of inside_box()...
loop:
wait(100);
&x = sp_x(&sprite, -1);
if (&x > ??)
{
//do stuff
}
goto loop;
...Heh, posted at the same time as Rabid.







