unfreezing when leaving (almost rhymes!)
WHY doesn't dink unfreeze when he chooses "leave"?
I have an almost excact same script where he dóes unfreeze when he leaves. Grrrr.
//script
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
choice_start()
"huh?
"blah"
"Leave"
choice_end()
if (&result == 1)
{
say_stop("poop", 1);
wait(200);
say_stop("`6shut up.", ¤t_sprite);
wait(200);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 2)
{
say_stop("...", 1);
wait(200);
say_stop("`6i guess you'd like to know what the real content of this script is, right?", ¤t_sprite);
wait(200);
unfreeze(1);
unfreeze(¤t_sprite);
}
I have an almost excact same script where he dóes unfreeze when he leaves. Grrrr.
//script
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
choice_start()
"huh?
"blah"
"Leave"
choice_end()
if (&result == 1)
{
say_stop("poop", 1);
wait(200);
say_stop("`6shut up.", ¤t_sprite);
wait(200);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 2)
{
say_stop("...", 1);
wait(200);
say_stop("`6i guess you'd like to know what the real content of this script is, right?", ¤t_sprite);
wait(200);
unfreeze(1);
unfreeze(¤t_sprite);
}
Since you don't have unfreeze(1); in the end of the script?

What scratcher said: you need to have an extra three lines for the Leave option at the end of your script:
//your script here plus these lines
unfreeze(1)
unfreeze(¤t_sprite)
}
//not enough closing brackets, so that's why there's another one here.
//your script here plus these lines
unfreeze(1)
unfreeze(¤t_sprite)
}
//not enough closing brackets, so that's why there's another one here.
D'oh! Ofcourse
But, I have an exact same script only the charachter says different lines, and there Dink dóes unfreeze, even without the unfreeze(1); after choice end. I copied it from the original Dink hunter script, and there it works too.
Weird?

But, I have an exact same script only the charachter says different lines, and there Dink dóes unfreeze, even without the unfreeze(1); after choice end. I copied it from the original Dink hunter script, and there it works too.
Weird?
Are you sure it's an exact copy of the script? It could also have to do with your bracket-placement, that you've placed a closing bracket for an if-statement but before the unfreeze lines for that if-statement..
I always do it like this:
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
choice_start()
"huh?
"blah"
"Leave"
choice_end()
if (&result == 1)
{
say_stop("poop", 1);
wait(200);
say_stop("`6shut up.", ¤t_sprite);
wait(200);
}
if (&result == 2)
{
say_stop("...", 1);
wait(200);
say_stop("`6i guess you'd like to know what the real content of this script is, right?", ¤t_sprite);
wait(200);
}
unfreeze(1);
unfreeze(¤t_sprite);
return;
}
I know the return; is unnecessary, but I still add it for some reason.
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
choice_start()
"huh?
"blah"
"Leave"
choice_end()
if (&result == 1)
{
say_stop("poop", 1);
wait(200);
say_stop("`6shut up.", ¤t_sprite);
wait(200);
}
if (&result == 2)
{
say_stop("...", 1);
wait(200);
say_stop("`6i guess you'd like to know what the real content of this script is, right?", ¤t_sprite);
wait(200);
}
unfreeze(1);
unfreeze(¤t_sprite);
return;
}
I know the return; is unnecessary, but I still add it for some reason.
Yeah, that's how I script it as well, yet without the return; . Only when the situation requires it, I add the unfreeze lines in the if (&result == xy) code.
I usually do like that too. With the return. (I also use return after kill_this_task(); although I'm trying to get rid of that habit
)
I once had some sort of an issue with my dmod that caused all my scripts to run from the top to the very bottom unless I had return; in the end of every procedure.

I once had some sort of an issue with my dmod that caused all my scripts to run from the top to the very bottom unless I had return; in the end of every procedure.
Probably, you then forgot a '}' or something. But that's weird.