The Dink Network

Reply to Re: Savebot script

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:
 
 
August 29th 2011, 02:31 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
DinkDoodler is right, it would indeed behave this way.

What you basically need to do is to make the duck 'conditionally active'. This means that you have some sort of global keeping track of what needs to happen and to make the duck active or not depending on the value of this global.

So in the script attached to the room you'd have a script like this:

void main(void)
{
if (&story == 6)
{
int &duck = create_sprite(400,200,3,21,1);
sp_script(&duck,"duck");
}
}

And then in duck.c:

void die(void)
{
&story = 7;
}

You could also use the editor_seq trick here, but when you're not making a large DMOD you'd probably not run into problems with limited globals anyway.