The Dink Network

Reply to Re: Scripting Help

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:
 
 
May 14th 2007, 05:15 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Whoa! That looks terribly complicated, and it can cause quite nasty bugs too... Doing a script_attach(1000); and no kill_this_task(); is a sure way of crashing the game if you do it a couple of times.

Do it like this: (remove the comments if you like)

//first freeze Dink and let it become dark...
freeze(1);
fade_down();
//Specify the screen Dink will go to
&player_map = #;
//New X and Y coordinates if necessary:
sp_x(1,#);
sp_y(1,#);
//Make the script survive the change of screens:
script_attach(1000);
//Now change screens:
load_screen();
draw_screen();
//Freeze Dink again and make it light again:
freeze(1);
fade_up();
//Rest of the cutscene if necessary
//And don't forget to kill the script afterwards to avoid bugs:
kill_this_task();