The Dink Network

Reply to Re: More bugs I'm afraid

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 17th 2014, 10:08 AM
spike.gif
Yeah, Leprochaun. Your scripts are kinda a mess.

s2-vine.c:
///Script for harvestable vines

void main(void)
{

If &uni2 is not 0, disable sprite:
if(&uni2 != 0)
{
sp_nodraw(&current_sprite, 1);
sp_active(&current_sprite, 0);
}
}

void talk(void)
{
sp_script(1, " ");


Story should be at one if we haven't spoken to Shiva yet. This if check sets &uni2 to 1, but DOESN'T increment &uni5. In the main proc, you disable the sprite if &uni2 is something other than 0. Therefore, the player can never talk to this sprite again, and never increase &uni5. This is the problem I ran into:
if(&story == 1)
{
freeze(1);
say_stop("This looks neat.", 1);
wait(200);
say_stop("I hope nature won't mind me taking it.", 1);

&uni2 = 1;
}


This, on the other hand, is the problem Beuc mentioned. It increments &uni5 by 1, but only checks for &story. In the end of the script, you only turn the sprite invisible rather than killing it. Therefore you can talk to the sprite repeatedly as long as you don't leave the screen, and increment &uni5 as many times as you like:

if(&story == 2)
{
freeze(1);
say_stop("I think these are vines.", 1);
&uni2 = 1;
&uni5 += 1;
}

unfreeze(1);
sp_nodraw(&current_sprite, 1);
}