The Dink Network

Freeze, please!

December 3rd 2009, 02:35 PM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 
I've made a secret teleport on my DMOD that'll lead to a timed level (square 219). I got 5 cool screens with stuff on that goes along with a background tune, and I want Dink to appear in a flash after the screens and the tune. (the flash isn't in the script atm)

void main ( void )
{
sp_brain(&current_sprite, 6);
sp_pframe(&current_sprite, 1);
sp_seq(&current_sprite, 170);
sp_timing(&current_sprite, 33);
wait(1000);
sp_touch_damage(&current_sprite, -1);
}	

void touch ( void )
{
sp_touch_damage(&current_sprite, 0);
freeze(1);
script_attach(1000);
wait(500);
sp_brain(1, 0);
playsound(51, 32050, 0, 0, 0);
fade_down();
&player_map = 156
sp_dir(1, 4);
sp_x(1, 444);
sp_y(1, 283);
sp_nodraw(1,1);
load_screen();
draw_screen();
fade_up();
wait(1000);
&player_map = 188
load_screen();
draw_screen();
wait(1000);
&player_map = 220
load_screen();
draw_screen();
wait(1000);
&player_map = 252
load_screen();
draw_screen();
wait(750);
Playsound(52,42050,0,0,0);
&player_map = 219
load_screen();
draw_screen();
wait(750);
sp_brain(1, 1);
Playsound(53,42050,0,0,0);
sp_nodraw(1,0);
unfreeze(1);
kill_this_task();
}


Dink will be able to walk around, talk etc. invisible at the start of the screen sequence, during the whole thing and appearing afterwards, he won't freeze due to the script attach thingy I guess, but I want him to freeze at the start and unfreeze at the bottom of the script, when the timed level starts. Any way to get this to work properly? I hope you get what I mean.
December 3rd 2009, 02:39 PM
fairy.gif
GlennGlenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
You have to freeze Dink each time you change his screen.
December 3rd 2009, 02:41 PM
dinkdead.gif
He'll unfreeze each time you change screen, I think it's the load_screen that does it.

Either freeze again each time you change or just turn his brain off
sp_brain(1, 0);
and back on afterwards.
December 3rd 2009, 02:42 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
It won't work yet because you have this line in the void main():

sp_touch_damage(&current_sprite, 0);

This should be:

sp_touch_damage(&current_sprite,-1);

Also, you need to freeze Dink again after loading a screen. Freezes don't survive screen changes, then just use an unfreeze() command at the bottom of the script.

Also kill_this_task; doesn't do anything, you need to use kill_this_task();
December 3rd 2009, 02:43 PM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 
Alright, I'll do sum tweaking then.

EDIT: Got it to work great by freezing Dink by disabling his brain (brainfreeze, hehe) and then activate it again at the end of the script, thanks all. The better script is on the first post.