The Dink Network

Locking screens....

December 8th 2008, 02:56 PM
farmer.gif
soulman
Peasant He/Him Bulgaria
I don't break rules.I bend them. 
Can someone of you guys tell me how can i lock a screen?I downloaded some tutorials about scripting but they said that i can only do it when i put stronger mosters.But i have seen people doing it with small pillbugs only.

I am working with WinDinkEdit
December 8th 2008, 03:01 PM
fairy.gif
GlennGlenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
// This should lock the screen
screenlock(1);

// This should unlock the screen
screenlock(0);
December 8th 2008, 03:23 PM
wizard.gif
anubis
Peasant He/Him Bulgaria
 
thanks but where should I type screenlock(1); ?
December 8th 2008, 03:27 PM
fairy.gif
GlennGlenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
Say you want a pillbug to have screenlock attached to it. Then put the screenlock(1) in the void main() procedure of the pillbug script and lock the screen up using screenlock(0) and put it in the void die() procedure.
December 8th 2008, 03:29 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Only certain enemy scripts from the main game had the screen lock in their scripts. You can check out my Pre-Used Scripts In Dink Smallwood file. It gives a list of the enemy scripts and tells their stats and which ones have screen locking capabilities.

If you wanted to lock a screen only the first time you entered it, you can use this script. Just attach it to a 'fake' sprite. Keep in mind that whatever you attach it to will disappear. It will beat a screen lock cheat also since it continuously locks the screen until all brain 9 enemies are gone.

void main( void )
{
int &monster;
sp_nodraw(&current_sprite, 1);
sp_nohit(&current_sprite, 1);

//loop checks for brain 9 monsters
loop:
wait(1);
&monster = get_sprite_with_this_brain(9, &current_sprite);

//if there are any brain 9 monster
//lock screen and go back to loop
if (&monster > 0)
{
screenlock(1);
goto loop;
}

//no monsters since we made past loop
//unlock screen with jingle sound
screenlock(0);
playsound(43, 22050,0,0,0);

//kills the screen locking sprite forever
int &editor_sprite = sp_editor_num(&current_sprite);
if (&editor_sprite != 0)
{
editor_type(&editor_sprite, 1);
}

kill_this_task();
}
December 9th 2008, 08:44 AM
farmer.gif
soulman
Peasant He/Him Bulgaria
I don't break rules.I bend them. 
Thanks a lot pal!Now i can finish my d-mod!
December 14th 2008, 06:48 AM
wizard.gif
anubis
Peasant He/Him Bulgaria
 
Well,thanks a lot rabidwolf9.That will help to me,too.