Help!This can't work!
I attached this script to a well,but when I tested it,the well just didn't talk to me! Can anyone tell me why is that?
script attached above:
void talk(void)
{
if (&story==0)
{
say_stop("`2Hey.",¤t_sprite);
wait (250);
say_stop("Wow!A talking well!",1);
wait (250);
say_stop("`2What?Haven't you seen a well talked?",¤t_sprite);
wait (250);
say_stop("Ummm...Yes.",1);
wait (250);
say_stop("`2dang£¡",¤t_sprite);
wait (250);
say_stop("...",1);
wait (250);
say_stop("`2There is a stone,hit it.",¤t_sprite);
wait (250);
say_stop("Fine.",1)
&story=1;
}
if (&story==1)
{
say_stop("`2Hit it!",¤t_sprite);
}
if (&story==2)
{
say_stop("`2Well done.",¤t_sprite);
wait (250);
say_stop("<sigh>",1);
&story=3;
}
if (&story==3)
{
say_stop("`2Hey.",¤t_sprite);
wait (250);
say_stop("Hey.",1);
}
}
void hit(void)
{
say_stop("`2grrr!",¤t_sprite);
}
script attached above:
void talk(void)
{
if (&story==0)
{
say_stop("`2Hey.",¤t_sprite);
wait (250);
say_stop("Wow!A talking well!",1);
wait (250);
say_stop("`2What?Haven't you seen a well talked?",¤t_sprite);
wait (250);
say_stop("Ummm...Yes.",1);
wait (250);
say_stop("`2dang£¡",¤t_sprite);
wait (250);
say_stop("...",1);
wait (250);
say_stop("`2There is a stone,hit it.",¤t_sprite);
wait (250);
say_stop("Fine.",1)
&story=1;
}
if (&story==1)
{
say_stop("`2Hit it!",¤t_sprite);
}
if (&story==2)
{
say_stop("`2Well done.",¤t_sprite);
wait (250);
say_stop("<sigh>",1);
&story=3;
}
if (&story==3)
{
say_stop("`2Hey.",¤t_sprite);
wait (250);
say_stop("Hey.",1);
}
}
void hit(void)
{
say_stop("`2grrr!",¤t_sprite);
}
Are you sure that &story is equal to 0 when the script starts?
Yes,I'm sure about it.
Maybe I should make &story a global varible?
I'm testing one thing:
I'm not sure if it helps, but try to put spaces like this
void talk(void) { if (&story==0) { say_stop("`2Hey.",¤t_sprite); wait (250); say_stop("Wow!A talking well!",1); wait (250); say_stop("`2What?Haven't you seen a well talked?",¤t_sprite); wait (250); say_stop("Ummm...Yes.",1); wait (250); say_stop("`2dang£¡",¤t_sprite); wait (250); say_stop("...",1); wait (250); say_stop("`2There is a stone,hit it.",¤t_sprite); wait (250); say_stop("Fine.",1) &story=1; } if (&story==1) { say_stop("`2Hit it!",¤t_sprite); } if (&story==2) { say_stop("`2Well done.",¤t_sprite); wait (250); say_stop("<sigh>",1); &story=3; } if (&story==3) { say_stop("`2Hey.",¤t_sprite); wait (250); say_stop("Hey.",1); } } void hit(void) { say_stop("`2grrr!",¤t_sprite); }
I'm not sure if it helps, but try to put spaces like this
(&story == 0)and so on. Another thing you should do is check out if the story is equal to 0 as Patrunjelu said.
Although this might not be the problem, you could try to freeze dink and the well... (it will help to follow the dialogue better)
freeze(1); freeze(¤t_sprite);
same for unfreeze @ the end of the script.
Your script should work since it is nothing wrong there. You could try setting &story to 0 before the actual dialogue (in the same script) to be sure that's not the problem.
freeze(1); freeze(¤t_sprite);
same for unfreeze @ the end of the script.
Your script should work since it is nothing wrong there. You could try setting &story to 0 before the actual dialogue (in the same script) to be sure that's not the problem.
void talk(void) { &story = 0; ... rest of script }
Thank you guys,I'll try that.
&story is supposed to be a global variable Unless you declare and use it in another script.
But as far as I can see, &story will be equal to 2 when the stone is hit (2 is a value assigned to it in the stone's hit procedure right?). That means, &story has to be global.
But as far as I can see, &story will be equal to 2 when the stone is hit (2 is a value assigned to it in the stone's hit procedure right?). That means, &story has to be global.
I made an effort as you told,but the well just said "Hey" to me,and there was no other words from it....
Why?
Why?
Why???
Why?
Why?
Why???
There is no big change.I just added some space in it...
void talk(void)
{
if (&story == 0)
{
say_stop("`2Hey.",¤t_sprite);
wait (250);
say_stop("Wow!A talking well!",1);
wait (250);
say_stop("`2What?Haven't you seen a well talked?",¤t_sprite);
wait (250);
say_stop("Ummm...Yes.",1);
wait (250);
say_stop("`2dang£¡",¤t_sprite);
wait (250);
say_stop("...",1);
wait (250);
say_stop("`2There is a stone,hit it.",¤t_sprite);
wait (250);
say_stop("Fine.",1)
&story = 1;
}
if (&story == 1)
{
say_stop("`2Hit it!",¤t_sprite);
}
if (&story == 2)
{
say_stop("`2Well done.",¤t_sprite);
wait (250);
say_stop("<sigh>",1);
&story = 3;
}
if (&story == 3)
{
say_stop("`2Hey.",¤t_sprite);
wait (250);
say_stop("Hey.",1);
}
}
void hit(void)
{
say_stop("`2grrr!",¤t_sprite);
}
void talk(void)
{
if (&story == 0)
{
say_stop("`2Hey.",¤t_sprite);
wait (250);
say_stop("Wow!A talking well!",1);
wait (250);
say_stop("`2What?Haven't you seen a well talked?",¤t_sprite);
wait (250);
say_stop("Ummm...Yes.",1);
wait (250);
say_stop("`2dang£¡",¤t_sprite);
wait (250);
say_stop("...",1);
wait (250);
say_stop("`2There is a stone,hit it.",¤t_sprite);
wait (250);
say_stop("Fine.",1)
&story = 1;
}
if (&story == 1)
{
say_stop("`2Hit it!",¤t_sprite);
}
if (&story == 2)
{
say_stop("`2Well done.",¤t_sprite);
wait (250);
say_stop("<sigh>",1);
&story = 3;
}
if (&story == 3)
{
say_stop("`2Hey.",¤t_sprite);
wait (250);
say_stop("Hey.",1);
}
}
void hit(void)
{
say_stop("`2grrr!",¤t_sprite);
}
void talk(void)
{
freeze(1);
freeze(¤t_sprite);
if (&story == 0)
{
say_stop("`2Hey.", ¤t_sprite);
wait(250);
say_stop("Wow!A talking well!", 1);
wait(250);
say_stop("`2What?Haven't you seen a well talked?", ¤t_sprite);
wait(250);
say_stop("Ummm...Yes.", 1);
wait(250);
say_stop("`2dang", ¤t_sprite);
wait(250);
say_stop("...", 1);
wait(250);
say_stop("`2There is a stone,hit it.", ¤t_sprite);
wait(250);
say_stop("Fine.", 1)
&story = 1;
}
if (&story == 1)
{
say_stop("`2Hit it!", ¤t_sprite);
}
if (&story == 2)
{
say_stop("`2Well done.", ¤t_sprite);
wait(250);
say_stop("<sigh>", 1);
&story = 3;
}
if (&story == 3)
{
say_stop("`2Hey.", ¤t_sprite);
wait(250);
say_stop("Hey.", 1);
}
unfreeze(1);
unfreeze(¤t_sprite);
}
void hit(void)
{
say_stop("`2grrr!",¤t_sprite);
}
Try it now.
The problem was since the beginning, the space between the procedure's name and it's parameter: wait(250) is correct, wait (250) isn't.
It should work now.
{
freeze(1);
freeze(¤t_sprite);
if (&story == 0)
{
say_stop("`2Hey.", ¤t_sprite);
wait(250);
say_stop("Wow!A talking well!", 1);
wait(250);
say_stop("`2What?Haven't you seen a well talked?", ¤t_sprite);
wait(250);
say_stop("Ummm...Yes.", 1);
wait(250);
say_stop("`2dang", ¤t_sprite);
wait(250);
say_stop("...", 1);
wait(250);
say_stop("`2There is a stone,hit it.", ¤t_sprite);
wait(250);
say_stop("Fine.", 1)
&story = 1;
}
if (&story == 1)
{
say_stop("`2Hit it!", ¤t_sprite);
}
if (&story == 2)
{
say_stop("`2Well done.", ¤t_sprite);
wait(250);
say_stop("<sigh>", 1);
&story = 3;
}
if (&story == 3)
{
say_stop("`2Hey.", ¤t_sprite);
wait(250);
say_stop("Hey.", 1);
}
unfreeze(1);
unfreeze(¤t_sprite);
}
void hit(void)
{
say_stop("`2grrr!",¤t_sprite);
}
Try it now.
The problem was since the beginning, the space between the procedure's name and it's parameter: wait(250) is correct, wait (250) isn't.
It should work now.
Oh I understand.
Thank you!!
Thank you!!
Patrunjelu, you don't need to put freeze(¤t_sprite) there, because the well probably isn't moving at all
...unless it has three, no, I mean two legs
...unless it has three, no, I mean two legs
I put freeze(¤t_sprite) by default to any sprite. I just got used to doing so.
There is one more problem.
When I talked to the well then I talked to the stone,it just said "Is it the well?" to me and there is no more words from it.
This is the stone's script.
void talk(void)
{
if (&story != 1)
{
say_stop("`3I'm a tree.",¤t_sprite);
}
if (&story == 1)
{
say_stop("`3Is it the well?",¤t_sprite);
wait(250);
say_stop("Yes.",1);
wait(250);
say_stop("`3I knew it.",¤t_sprite);
&story = 2;
}
}
void hit(void)
{
say_stop("`3Don't hit me!",¤t_sprite);
}
When I talked to the well then I talked to the stone,it just said "Is it the well?" to me and there is no more words from it.
This is the stone's script.
void talk(void)
{
if (&story != 1)
{
say_stop("`3I'm a tree.",¤t_sprite);
}
if (&story == 1)
{
say_stop("`3Is it the well?",¤t_sprite);
wait(250);
say_stop("Yes.",1);
wait(250);
say_stop("`3I knew it.",¤t_sprite);
&story = 2;
}
}
void hit(void)
{
say_stop("`3Don't hit me!",¤t_sprite);
}
void talk(void)
{
freeze(1);
freeze(¤t_sprite);
if (&story != 1)
{
say_stop("I'm a tree.", ¤t_sprite);
}
if (&story == 1)
{
say_stop("`3Is it the well?", ¤t_sprite);
wait(250);
say_stop("Yes.", 1);
wait(250);
say_stop("I knew it.", ¤t_sprite);
&story = 2;
}
unfreeze(1);
unfreeze(¤t_sprite);
}
void hit(void)
{
say_stop("`3Don't hit me!", ¤t_sprite);
}
try it now.
and for better looks:
{
freeze(1);
freeze(¤t_sprite);
if (&story != 1)
{
say_stop("I'm a tree.", ¤t_sprite);
}
if (&story == 1)
{
say_stop("`3Is it the well?", ¤t_sprite);
wait(250);
say_stop("Yes.", 1);
wait(250);
say_stop("I knew it.", ¤t_sprite);
&story = 2;
}
unfreeze(1);
unfreeze(¤t_sprite);
}
void hit(void)
{
say_stop("`3Don't hit me!", ¤t_sprite);
}
try it now.
and for better looks:
void talk(void) { freeze(1); freeze(¤t_sprite); if (&story != 1) { say_stop("I'm a tree.", ¤t_sprite); } if (&story == 1) { say_stop("`3Is it the well?", ¤t_sprite); wait(250); say_stop("Yes.", 1); wait(250); say_stop("I knew it.", ¤t_sprite); &story = 2; } unfreeze(1); unfreeze(¤t_sprite); } void hit(void) { say_stop("`3Don't hit me!", ¤t_sprite); }
Wow!It worked again!
Could you tell me what's wrong with the origional script?
Could you tell me what's wrong with the origional script?
I didn't change much to it. It's just the space between wait procedure and it's parameter.
You are using wait (250); when you should be using wait(250);
Once the game tries to compile the wait (250); line it gets an error and doesn't even try to do anything further with the script.
You are using wait (250); when you should be using wait(250);
Once the game tries to compile the wait (250); line it gets an error and doesn't even try to do anything further with the script.
Oh,I understand.
Now,it's time to take over the world!Hahahaha!
Now,it's time to take over the world!Hahahaha!
Nooooo!You can't die!
What can I do without you?How can I defeat a pillbug if you are not with me?HOW?...<burst into tears>
What can I do without you?How can I defeat a pillbug if you are not with me?HOW?...<burst into tears>
Now a thing asked millions of times:
How come every topic in TDN always gets off-topic?
How come every topic in TDN always gets off-topic?
Don't worry. I am immune to poison.
After solving one's problems a piece of offtopic is always welcome.
After solving one's problems a piece of offtopic is always welcome.
Ummm...May I ask what a "offtopic" is?
I don't know much about that you know.
I don't know much about that you know.
This thread was created so that you can find out why your script wasn't working.
When we started talking about something else other than your script (poison thing and taking over the world) we were offtopic since those things were never the point of this thread.
When we started talking about something else other than your script (poison thing and taking over the world) we were offtopic since those things were never the point of this thread.
Oh.I'll take care about that.
God,forgive me for my off-topic behavior...
God,forgive me for my off-topic behavior...
It's not so horrible.
Now, if you want to create a thread not connected to Dink or just something completely random, then you can use the off-topic thread (marked with banana)
Now, if you want to create a thread not connected to Dink or just something completely random, then you can use the off-topic thread (marked with banana)
I agree completely.
I'm new here after all.
I'm new here after all.