The Dink Network

As always... Problems

April 3rd 2006, 04:10 PM
slayer.gif
Yeah I keep asking noob and stupid questions about easy stuff andsuchandsuch, but I'd really like to know why is Dink saying all talk options instead of just one. Also - Dink keeps talking these all options even after the speaking should be done!! The guy I'm talking to does not freeze - and oh - you could in the meantime tell me how to make this sprite walk normally... i know the walk and speed sprites are missing... but I don't even know them. Please show me the working script?

void talk( void )
{
freeze(1)
freeze(¤t_sprite)

choice_start()
set_title_color 7
title_start();
It's good to see you again, as always.
title_end();
"Tell him to hurry"
"Be nice and polite to him"
"Leave your useless servant"
choice_end();
if (&result == 1);
{
say_stop("&speech", 1);
say_stop("&speech", 1);
say_stop("&speech1);
wait(200)
say_stop("`3&speech", &current_sprite);
wait(200)
say_stop("&speech", 1);
wait(200)
say_stop("`3&speech", ¤t_sprite);
wait(200)
say_stop("&speech", 1);
wait(200)
say_stop"`3&speech", ¤t_sprite);
unfreeze(1)
unfreeze(¤t_sprite);
}
if (&result == 2);
{
say_stop("&speech", 1);
wait(200)
say_stop("`3&speech", ¤t_sprite);
wait(200)
say_stop("&speech", 1);
wait(200)
say_stop("`3&speech", ¤t_sprite);
wait(200)
say_stop("&speech", 1);
unfreeze(1)
unfreeze(&current_sprite);
}

void hit( void )
{
say("&speech", 1);
}
April 3rd 2006, 04:15 PM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
Try THis
------------
void talk( void )
{
freeze(1)
freeze(&current_sprite)

choice_start()
set_title_color 7
title_start();
It's good to see you again, as always.
title_end();
"Tell him to hurry"
"Be nice and polite to him"
"Leave your useless servant"
choice_end();
if (&result == 1);
{
say_stop("Hurry up! Don't just stand like a", 1);
say_stop("a", 1);
say_stop("a bumblebee!", 1);
wait(200)
say_stop("`3Hello, my Lord.", &current_sprite);
wait(200)
say_stop("That's what you shouldn't do... move please?", 1);
wait(200)
say_stop("`3Where, to do what?", &current_sprite);
wait(200)
say_stop("Wel... actually.. uhm...", 1);
wait(200)
say_stop"`3I will do.", &current_sprite);
unfreeze(1)
unfreeze(&current_sprite);
}
if (&result == 2);
{
say_stop("You don't seem to have much work lately. What are you going to do?", 1);
wait(200)
say_stop("`3To follow your orders, my Lord.", &current_sprite);
wait(200)
say_stop("I haven't got any, so you can get a day free.", 1);
wait(200)
say_stop("`3Ugatsikauujee THAANK YOUU!!", &current_sprite);
wait(200)
say_stop("You're welcome!", 1);
unfreeze(1)
unfreeze(&current_sprite);
}
}

void hit( void )
{
say("USELESS", 1);
}
April 4th 2006, 12:20 AM
slayer.gif
I copied your script directly from that post but few things were changed. Or rather none... The guy said everything...everything. First it says the choice 1, both are frozen - but when the conversation is over, it says the choice 2. "Leave" doesn't seem to do anything aswell. But you said Try this... but thank you anyway.
April 4th 2006, 01:12 AM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
The main problem here is caused by the ';' at the end of the control statements (the ifs). I would assume those would make Dink think they are commands and not control statements (actually, I'm not even sure if ;'s are even neccessary in DinkC, but I add them in anyway). I cleaned up the code a bit for you, as well. Try out this.

void talk( void )
{
freeze(1);
freeze(&current_sprite);

choice_start()
set_title_color 7
title_start();
It's good to see you again, as always.
title_end();
"Tell him to hurry"
"Be nice and polite to him"
"Leave your useless servant"
choice_end();
if (&result == 1)
{
say_stop("Hurry up! Don't just stand like a", 1);
say_stop("a", 1);
say_stop("a bumblebee!", 1);
wait(200);
say_stop("`3Hello, my Lord.", &current_sprite);
wait(200);
say_stop("That's what you shouldn't do... move please?", 1);
wait(200);
say_stop("`3Where, to do what?", &current_sprite);
wait(200);
say_stop("Wel... actually.. uhm...", 1);
wait(200);
say_stop"`3I will do.", &current_sprite);
}

if (&result == 2)
{
say_stop("You don't seem to have much work lately. What are you going to do?", 1);
wait(200);
say_stop("`3To follow your orders, my Lord.", &current_sprite);
wait(200);
say_stop("I haven't got any, so you can get a day free.", 1);
wait(200);
say_stop("`3Ugatsikauujee THAANK YOUU!!", &current_sprite);
wait(200);
say_stop("You're welcome!", 1);
}
unfreeze(1);
unfreeze(&current_sprite);
}

void hit( void )
{
say("USELESS", 1);
}
April 4th 2006, 01:13 AM
anon.gif
kjmarket
Ghost They/Them
 
The reason it's saying everything, is because you have semicolons at the end of your if-statements. That causes it to not read that line due to an error. So it's like the if statements dont even exist...hence the fact that all say lines are said every time. So get rid of the semicolons at the end of the if statements.

Also...the line:

say_stop("&speech1);

is wrong. You also need semicolons at the end of your wait and freeze/unfreeze lines.

void talk( void )
{
freeze(1);
freeze(¤t_sprite);

choice_start();
set_title_color 7
title_start();
It's good to see you again, as always.
title_end();
"Tell him to hurry"
"Be nice and polite to him"
"Leave your useless servant"
choice_end();
if (&result == 1)
{
say_stop("&speech", 1);
say_stop("&speech", 1);
say_stop("&speech", 1);
wait(200);
say_stop("`3&speech", &current_sprite);
wait(200);
say_stop("&speech", 1);
wait(200);
say_stop("`3&speech", ¤t_sprite);
wait(200);
say_stop("&speech", 1);
wait(200);
say_stop"`3&speech", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
}
if (&result == 2)
{
say_stop("&speech", 1);
wait(200);
say_stop("`3&speech", ¤t_sprite);
wait(200);
say_stop("&speech", 1);
wait(200);
say_stop("`3&speech", ¤t_sprite);
wait(200);
say_stop("&speech", 1);
unfreeze(1);
unfreeze(&current_sprite);
}

void hit( void )
{
say("&speech", 1);
}

April 4th 2006, 01:14 AM
duckdie.gif
LOL..you beat me to it..
April 4th 2006, 01:25 AM
slayer.gif
I have tried your both's suggestions, but they don't change a thing...
April 4th 2006, 01:30 AM
slayer.gif
But... how come, Dink can still say the same things even though I changed them?

say_stop("&speech", 1);

Dink still says "Hurry up..." AM I EDITING COMPLETELY THE WRONG LINE...?
April 4th 2006, 02:07 AM
duckdie.gif
Is it still saying ALL the lines or is it just saying the same line even if you change the text? Also..did you get him walking yet? I dont know which sprite it is..so give the sequence number.

EDIT. By the way..Striker's script should work.

And as far as saying the same thing even if you change it...you are telling it to say whatever &speech equals. So if you fail to change the variables value, it's going to say the same thing. Try just using a string value rather than a variable for just text. &speech is a global variable I take it, seeing as you didn't initialize it. You have all say lines using that variable. Where do you change the value of &speech?

Did you try using Strikers script?

EDIT 2: Strikers script works fine, as I said it should. Not sure what you are doing wrong...
April 4th 2006, 08:55 AM
slayer.gif
First:
It's saying all the lines, the first one by option and both are frozen...Second one without meaning and it also looks like the conversation is already over and they're just talking in the "By The Way" style.

Second: I didn't get him walking yet.

EDIT: Striker's script doesn't seem to work...

Third:I just... I actually just thought: "Hmm, maybe I shouldn't be telling what the sprites say... let's "censore" the speeches. I'd propably add & into the beginning too... just for fun..." So I actually was unaware that a script "&speech" actually exists. I don't know where to change the value of &speech.

Fourth: Yes.

EDIT 2: I'm neither sure what am I doing wrong. It should work fine. but still...

My scripting problems are never easy to solve.
April 5th 2006, 01:05 AM
duckdie.gif
Strikers script DOES work, with no errors or problems whatsoever. I copied it as is, and attached it to a sprite. Works great.

Doesnt your script just say the same word/sentence, or whatever over and over, since you use &speech for them all and never change what it means? How do you use one variable for all say lines in script?

Maybe I'm just really dense today but I'm having a hard time understanding what you mean.

April 5th 2006, 01:10 AM
slayer.gif
Yes, I believe Strikers script DOES work. I copied it too. But no problems was I rid of.

I understand neither what you mean, and if I got it right you are asking me something we both do not know. I just typed in &speech without ANY reason, and boom, it turns out it was actually a script.
April 5th 2006, 01:21 AM
duckdie.gif
Well, then &speech is a problem too. Try doing like Strikers script, witht he tect string rather than variables. Now as far as making him walk, you need to set a base_walk for the sprite in its main procedure. I don t know what sprite you are using, so I'll just give an example. Say you want to use the green merchant sprite that is facing down-left. The sequence is 381, so the base_walk is 380. To get the basewalk you round down by tens. So 457 would have a base_walk of 450...162 would be 160...etc.

void main(void)
{
sp_base_walk(&current_sprite, 380);
sp_speed(&current_sprite, 1);
sp_brain(&current_sprite, 16);
}

The brain is important. Brain 16 is a smart person brain. It enables the sprite to walk around, stop, look around.
April 5th 2006, 12:23 PM
slayer.gif
&speech? I just simply made it up really. And it was just a way to "censore" the script's line. So don't bother yoursel with it. And what do you mean with "tect string"?

I couldn't even make my guy walk. But... this is weird. I couldn't even change my dark blue guy look green just to test your script. Pretty.
April 5th 2006, 02:40 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Write <speech> instead of &speech, it will create a lot less confusion.

And I really don't know what's wrong with Striker's script, this leads me to believe that the problem might not be in this script.
April 5th 2006, 06:57 PM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
Yeah... after reading this thread I'm not quite even sure what problem V is talking about anymore. Using &speech to substitute actual words is confusing. Maybe there's another script running that's interfering with the one you posted?
April 6th 2006, 12:47 AM
duckdie.gif
There is no problem with Strikers script....it's error free. I don't know the exact problem anymore, either. Though striker's thought is the only thing I've thought of that makes any sense to explain your problem.
April 7th 2006, 04:39 PM
slayer.gif
Hmm... if I could, I'd send you the problem by using the "map1-map2"-method Wesley used. But just copying the Dink.dat and Map.dat and then editing them seems to work - but it's not displayed in the DinkFrontEnd no matter what I do.