Reply to Re: Taking Dink x and y coordinates
If you don't have an account, just leave the password field blank.
Meta: However attaching it to another sprite does the exact same thing as attaching it to the screen. So it isn't that straightforward from my point of view...
Yeah you're right, I overlooked that. I guess Dink is placed on the screen last.
Scratcher: Seems perfectly reliable to me, much more so than using waits since there's always some variation with those on different computers.
If the wait is only 0 or 1 there shouldn't be variation depending on the speed of the computer. The order things are executed in should usually be independent on processing speed. So it shouldn't matter for my solution. Besides, since the change in x or y is so dramatic on changing screens there is huge tolerance for error. A 6 pixel error isn't going to mask a change of 400 pixels as Dink moves from the screen on the left.
Just so in case it is not clear
void main void)
{
int &x = sp_x 1,-1);
wait 0);
&x -= sp_x 1,-1);
if &x > 300)
{
//came from the left
}
}
forgive my lack of opening parenthesis..
Yeah you're right, I overlooked that. I guess Dink is placed on the screen last.
Scratcher: Seems perfectly reliable to me, much more so than using waits since there's always some variation with those on different computers.
If the wait is only 0 or 1 there shouldn't be variation depending on the speed of the computer. The order things are executed in should usually be independent on processing speed. So it shouldn't matter for my solution. Besides, since the change in x or y is so dramatic on changing screens there is huge tolerance for error. A 6 pixel error isn't going to mask a change of 400 pixels as Dink moves from the screen on the left.
Just so in case it is not clear
void main void)
{
int &x = sp_x 1,-1);
wait 0);
&x -= sp_x 1,-1);
if &x > 300)
{
//came from the left
}
}
forgive my lack of opening parenthesis..