Reply to Re: Screenlock?! No!
If you don't have an account, just leave the password field blank.
// scrnlk1.c
void main(void)
{
// Make this sprite invisible
sp_nodraw(¤t_sprite,1);
// Screenlock the screen
screenlock(1);
// Loop forever, until there aren't any sprites with brains 9 and 10 on the screen
loop:
wait(250);
if (get_sprite_with_this_brain(9, 0) == 0)
{
if (get_sprite_with_this_brain(10, 0) == 0)
{
// Remove the screenlock
screenlock(0);
playsound(43, 22050,0,0,0);
// Kill this sprite forever, so there aren't any more screenlocks!
int &editor_sprite = sp_editor_num(¤t_sprite);
if (&editor_sprite != 0)
{
editor_type(&editor_sprite, 1);
}
kill_this_task();
}
}
goto loop;
}
void main(void)
{
// Make this sprite invisible
sp_nodraw(¤t_sprite,1);
// Screenlock the screen
screenlock(1);
// Loop forever, until there aren't any sprites with brains 9 and 10 on the screen
loop:
wait(250);
if (get_sprite_with_this_brain(9, 0) == 0)
{
if (get_sprite_with_this_brain(10, 0) == 0)
{
// Remove the screenlock
screenlock(0);
playsound(43, 22050,0,0,0);
// Kill this sprite forever, so there aren't any more screenlocks!
int &editor_sprite = sp_editor_num(¤t_sprite);
if (&editor_sprite != 0)
{
editor_type(&editor_sprite, 1);
}
kill_this_task();
}
}
goto loop;
}