The Dink Network

Reply to Re: screen stuff

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:
 
 
October 29th 2003, 10:56 AM
wizardg.gif
Paul
Peasant He/Him United States
 
Like this:
int &junk = create_sprite(<numbers go here> ;
sp_script(&junk, "MyScript");

&junk could be any variable name of course and you only need the "int" if you haven't declared that variable it already. "MyScript" would be the nam of the script file only without the .c at the end. (eg "en-bonc" for "en-bonc.c")

Also, let me point out a couple details on the warp thing:
script_attach(1000);
.
.
.
kill_this_task();

What the script_attach(1000); does is detach the script from the sprite it was attached to, because otherwise, the script is killed when you warp the the next screen and the part after that won't run. But because the script can now run on any screen, you need kill_this_task(); at the end to get rid of it.