Reply to The Better Mousetrap... er, Screenlock
If you don't have an account, just leave the password field blank.
I've been thinking, the way that Seth did Screenlocks in the original game is quite... stupid. It requires you to have special-monster scripts just so you can lock the screen, and unlock it when Dink kills all the monsters. And that's just a waste of space.
My idea (which may have been done before, but I don't recall) is to just place a sprite with a script on the screen, and tada, instant screenlock. And if you decide later that you don't want a screenlock, its a lot easier to delete the sprite rather than to change every monster's script.
This is how it would work: create a screenlock image. It doesn't have to be big (the one I'm using is 50x50 pixels), but it should stand-out so you can see which screens are screenlocked. Then just attach the following script to it, and you're ready to go.
//Screenlock The screen
void main(void)
{
sp_nodraw(&current_sprite,1);
screenlock(1);
loop:
if (get_sprite_with_this_brain(9, &current_sprite) == 0)
{
if (get_sprite_with_this_brain(10, &current_sprite) == 0)
{
screenlock(0);
playsound(43, 22050,0,0,0);
kill_this_task();
}
}
wait(250);
goto loop;
}
The nodraw line allows you to see your little screenlock graphic in WDE or DE, but the player won't see it at all from within Dink. The rest is pretty self-explanatory.
My idea (which may have been done before, but I don't recall) is to just place a sprite with a script on the screen, and tada, instant screenlock. And if you decide later that you don't want a screenlock, its a lot easier to delete the sprite rather than to change every monster's script.
This is how it would work: create a screenlock image. It doesn't have to be big (the one I'm using is 50x50 pixels), but it should stand-out so you can see which screens are screenlocked. Then just attach the following script to it, and you're ready to go.
//Screenlock The screen
void main(void)
{
sp_nodraw(&current_sprite,1);
screenlock(1);
loop:
if (get_sprite_with_this_brain(9, &current_sprite) == 0)
{
if (get_sprite_with_this_brain(10, &current_sprite) == 0)
{
screenlock(0);
playsound(43, 22050,0,0,0);
kill_this_task();
}
}
wait(250);
goto loop;
}
The nodraw line allows you to see your little screenlock graphic in WDE or DE, but the player won't see it at all from within Dink. The rest is pretty self-explanatory.