Locking screens....
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
I am working with WinDinkEdit
// This should lock the screen
screenlock(1);
// This should unlock the screen
screenlock(0);
screenlock(1);
// This should unlock the screen
screenlock(0);
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.
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(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
//loop checks for brain 9 monsters
loop:
wait(1);
&monster = get_sprite_with_this_brain(9, ¤t_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(¤t_sprite);
if (&editor_sprite != 0)
{
editor_type(&editor_sprite, 1);
}
kill_this_task();
}
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(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
//loop checks for brain 9 monsters
loop:
wait(1);
&monster = get_sprite_with_this_brain(9, ¤t_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(¤t_sprite);
if (&editor_sprite != 0)
{
editor_type(&editor_sprite, 1);
}
kill_this_task();
}
Thanks a lot pal!Now i can finish my d-mod!