The Dink Network

Reply to Re: Killing a script after one use

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:
 
 
April 5th 2009, 07:43 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
I'm very confident that it is killed once you leave the screen. But it sounds like that isn't what you want. You probably want the script not to be run again once you re-enter the screen. Then killing the script is pretty useless...

You need to use a global variable to solve this (for example &story):

void main(void)
{
if (&story == 0)
{
freeze(1);

say_stop("Whoa, i feel dizzy...", 1);
wait(250);
sp_dir(1,2);
wait(100);
sp_dir(1,4);
wait(100);
sp_dir(1,6);
wait(100);
sp_dir(1,8);
wait(100);
say_stop("W...Where am i? Nick?", 1);
wait(200);
sp_dir(1,6);
wait(80);
say_stop("Oh...Oh NO! Nick!", 1);
wait(200);
say_stop("Oh my god! This is not happening, this is NOT happening!", 1);
wait(200);
say_stop("I need to find some cover...and fast!", 1);
unfreeze(1);
&story = 1;
}
}

Check out chapter 8 in my tutorial if you like to know more about making things happen only once.