The Dink Network

Reply to inside_box (solved)

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:
 
 
January 5th 2014, 02:02 PM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 
Gah.

Say I created a box with inside_box. &box = inside_box(&dx, &dy, blabla); It returns 1 when &dx and &dy is inside the box and 0 if it is not. Simple.

Can I make use of inside_box to check whenever &dx, &dy (Dink) leaves the box? I'm thinking too wildly with a loop that checks the position of Dink constantly and having some plans with if(&box == 1) and if(&box == 0) within touch(void) but I can't get it to work.

Or even better, being able to check when Dink enters or leaves a sprite. Can it be done? Think pressure plate that is active (1) when Dink is standing on it and when Dink leaves it, it deactivates (0).