The Dink Network

Reply to Re: 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:
 
 
August 26th 2006, 06:44 PM
death.gif
void main(void)

{
// Make this sprite invisible
sp_nodraw(&current_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(&current_sprite);
if (&editor_sprite != 0)
{
editor_type(&editor_sprite, 1);
}
kill_this_task();
}
}
goto loop;

}

Try this; and attach it to a sprite that you do not want to be in the actual game... I use the giant duck statue...

The kill this sprite forever line is optional, and can be removed if you always want that screen to be screenlocked when there are enemies.