The Dink Network

Reply to Re: Screenlocking/Story

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:
 
 
July 28th 2010, 05:21 PM
anon.gif
Absolution
Peasant They/Them
The Dark Lord of the DN. 
Here's the script I attached to an invisible box in the corner of the map:
void main(void)
{
// Make this sprite invisible
sp_nodraw(&current_sprite,1);
// Screenlock the screen
screenlock(1);
say("dang pillbugs!" ,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);


The screenlock doesn't work.

EDIT: I'll attach this script to the pills. Maybe that'll work.
EDIT: Screenlocking pillbug script -
//screenlocking pill
//pillbug brain

void main( void )
{
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 1);
sp_exp(&current_sprite, 5);
sp_base_walk(&current_sprite, 130);
sp_base_death(&current_sprite, 140);
sp_touch_damage(&current_sprite, 1);
sp_hitpoints(&current_sprite, 8);
preload_seq(131);
preload_seq(133);
preload_seq(141);
preload_seq(143);
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);

if (random(2,1) == 1)
 {
 sp_target(&current_sprite, 1);
 }
}

void hit( void )
{
sp_target(&current_sprite, &enemy_sprite);
playsound(30, 21050, 4000, &current_sprite, 0);
//lock on to the guy who just hit us
//playsound
}
void die( void )
{
  int &hold = sp_editor_num(&current_sprite);
  if (&hold != 0)
  editor_type(&hold, 1); 

&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);

 external("emake","small");

}



That doesn't work either.

EDIT: I was stupid again. I removed the obviously placed second "void main ( void ), and the invisible thingy. Now it screenlocks, but when all the pills die, it's still locked. \
EDIT: The invisi-boxes are gone now too. XD