The Dink Network

Reply to Weird issue with screenlocks.

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:
 
 
September 5th 2016, 05:34 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Just noticed this issue today, don't know if anyone else has ever. Basically, add this script to a screen:

void main(void)
{
int &myy;
&myy = sp_y(1, -1);

	if (&myy > 150)
	{
	screenlock(1);
	}
}


Try entering from the below or above screens. Works like it's supposed to, right? The screenlock only activates when you enter from the above screen.

But try entering from the screens to the right and left, and it suddenly gets reversed. If you enter, say, from the right, you now need to be below Y150, for the screenlock to activate. Seems to make no sense. And you can't get rid of the error anyhow. I tried every method within the same script, including both adding an X coordinate to make sure the screenlock never appeared if I entered from the right, and then adding one to unlock the screen if I did. Neither worked. I ended up having to place a separate sprite to make sure once Dink touches it the screen will unlock.

Note that I didn't actually try this on a script added to a screen, so it might work perfectly fine there. I encountered it in an enemy script. Shouldn't make any difference, though.

The X and Y coordinates seem to be completely messed up, anyway. When you script something to be "greater than", it actually counts as "lesser than" and vice versa. I mean, shouldn't the above script make the screenlock appear when Dink is below the specified coordinate, because in Dink, the number of Y increases the further you go down. However, it makes the screenlock appear when you're above it. It's not that bad once you get used to it, but kinda messy.