The Dink Network

Reply to Re: Touching!

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
March 25th 2008, 07:02 PM
dinkdead.gif
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.