The Dink Network

Does this work?

April 30th 2006, 05:36 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Sorry for botherig you all with my questions, but I could use a helping hand here
When I use talk choices (like "Say hello")can I do a choice like this? (&story == 1)"Say blaha"
And then take another choice after the first choice like: will you go there yet, dink?
"Yes" "no"? Just say if you want me to explain my problem more detailed
April 30th 2006, 05:52 AM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
Yes that's possible. And yes explain more detailed if you want to know more.
April 30th 2006, 09:54 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
But how do I do then? If "Say Hello" is result 1, and that (&story == 1)"Say blaha" is result 2... what will the choise "yes" and "no" have?
April 30th 2006, 09:58 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
You mean something like this?

choice_start()
"Say hello"
(&story == 1) "Say blabla"
choice_end()
wait(250);

if (&result == 1)
{
// the say hello part
}

if (&result == 2)
{
// the say blabla part
// you can place the yes/no choice here
choice_start()
"Yes"
"No"
choice_end()
wait(250);

if (&result == 1)
{
// the yes part
}
if (&result == 2)
{
// the no part
}
}
April 30th 2006, 10:04 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Yepp, that is exactly what I mean
Thanks!
April 30th 2006, 06:14 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Wait a second...

choice_start()
"Say hello"
(&story == 1) "Say blabla"
choice_end()
wait(250);

if (&result == 1)
{
// the say hello part
}

if (&result == 2)
{
// the say blabla part
// you can place the yes/no choice here
choice_start()
"Yes"
"No"
choice_end()
wait(250);

if (&result == 1)
{
// the yes part
}
if (&result == 2)
{
// the no part
}
}

How do the game now which one who is the first "if (&result == 1)"? It occure at two places
I marked it with if you're not understand what i mean
April 30th 2006, 06:24 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
If you'd indent the script, you'll see that the second "if (&result == 1)" is nested inside the first "if (&result == 2)". The second "if (&result == 1)" takes the &result from the second choice statement
April 30th 2006, 06:30 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
But when I tested, it didn't work... Could it be another error then?
April 30th 2006, 06:34 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Well... you should have &story defined in main.c, and this code should be in some procedure (like void talk( void ), void hit( void ), or whatever), but otherwise... what didn't work?

The only thing that should happen is:

Nothing if you first select the first option.
Another choice menu if you first select the second option.
Nothing if you select the first option in the second choice
Nothing if you select the second option in the second choice
April 30th 2006, 07:09 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
He won't talk to me when I take that option, it just freezes.

I have a second question... After the second chocie "yes" or "no" could I put in a THIRD choice after?
April 30th 2006, 07:21 PM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
Yes, and you could have a fourth or a fifth. Really, as many choice prompts as you want to have. There's no limit.
April 30th 2006, 07:32 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Nice I'll complete the script and test it... Don't be suprised if I'll continue this thread
May 2nd 2006, 11:35 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
god dam... The program get an error and close itselfs when i come to this part
Can anyone see what I'm doing wrong? (marked the place when the game just F&¤K up with )

say_stop("`4One of your strenght points.", ¤t_sprite);
wait(200);
say_stop("Uh... Okay.", 1);
wait(200);

choice_start();
set_y 240
set_title_color 1
title_start();
"TITLE TITLE TITLE TITLE TITLE TITLE."
title_end();
"Yes"
"No"
wait(250);

if (&result == 1)
{
say_stop("`0blaha blaha blaha.", ¤t_sprite);
wait(200);
May 2nd 2006, 11:39 AM
pq_skull.gif
dinkme
Peasant He/Him India
 
say_stop("`4One of your strenght points.", ¤t_sprite);
wait(200);
say_stop("Uh... Okay.", 1);
wait(200);

choice_start();
set_y 240
set_title_color 1
title_start();
TITLE TITLE TITLE TITLE TITLE TITLE.
title_end();
"Yes"
"No"
wait(250);
choice_end();
//there should be choice_end(); command here

if (&result == 1)
{
say_stop("`0blaha blaha blaha.", ¤t_sprite);
wait(200);
May 2nd 2006, 11:40 AM
pq_skull.gif
dinkme
Peasant He/Him India
 
I think you forgot to write choice_end(); after the option. That's why its not working. Plus you don't need to write the title in inverted commas
May 2nd 2006, 11:51 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Yepp, that was the problem... Thanks!
May 5th 2006, 01:03 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Hehe I'm back
I know how to add stuffs, like exp or something... but can you take a way stuffs to? I want to take away a magic point when Dink answer wrong to a guys... Is it possible?
May 5th 2006, 01:09 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
This will substract one magic point:

&magic -= 1;

The following:

&strength -= 1;
&defense -= 1;

work the same.
May 5th 2006, 01:35 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Yeah I thought so thanks for the answer!
May 5th 2006, 05:08 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Heh, I'm a bit confused... If I have we say THREE talk-choices how will the game now which one who belongs to the right choice? Example:

choice_start();
"Blabla"
(&story == 1)"Blahaa"
"leave"
choice_end();

if (&result == 1)
{
// the result ONE goes here...
}

if (&result == 2)
{
//blahaa leads to ANOTHER choise
choice_start();
"Yeah"
"Nope"
choice_end();

if (&result == 1)
{
// NOTE THIS IS THE SECOND ONE!
}

and so on, I think you see my point (I hope you do...) My didn't work when I did my script like this, so please someone, explain for me how dinkeditor will know!
May 5th 2006, 05:12 PM
spike.gif
Where did you get the idea you only use 1 and 2? "leave" is the third choice, so you do

if (&result == 3)

EDIT: Sorry, I didn't read your post very carefully.
May 5th 2006, 05:15 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Make sure you nest the code correctly. For example:

choice_start()
"Choice option 1"
(&condition == 1) "Choice option 2"
"Choice option 3"
choice_end()

if (&result == 1)
{
// this is for Choice option 1
}

if (&result == 2)
{
// this is for Choice option 2
choice_ start()
"Choice option 4"
"Choice option 5"
choice_end()

if (&result == 1)
{
// this is for Choice option 4
}

if (&result == 2)
{
// this is for Choice option 5
}
}

if (&result == 3)
{
// this is for Choice option 3
}

As you can see, each choice statement has his own &results and they're numbered 1, 2, 3, etc. If you have a choice menu again, then you simply start again with 1, 2, 3 etc. Also note that if there's a &condition to let a menu-item show up or not, the game determines the correct choice option so you can keep numbering them 1, 2, 3 even if the second choice item (in this example) doesn't actually show up ingame.

Edit: Note to self: don't use spaces in codeposts, Miasma doesn't like that when you edit a post
May 5th 2006, 05:52 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
The next miasma should really have [code][/code] tags...

Better emphasis now, Phoenix?
May 5th 2006, 06:13 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
I think I got it... I'll take a look on it.
May 5th 2006, 06:49 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Wait a second... That you said Simeon did I know, I mean something like this:

choice_start()
"Choice option 1"
(&condition == 1) "Choice option 2"
"Choice option 3"
choice_end()

if (&result == 1)
{
// this is for Choice option 1
}

if (&result == 2)
{
// this is for Choice option 2
choice_ start()
"Choice option 4"
"Choice option 5"
choice_end()

if (&result == 1)
{
// this is for Choice option 4
}

if (&result == 2)
{
// this is for Choice option 5
}
}

if (&result == 3)
{
// this is for Choice option 3
}

How do I continue on a started choise menu if I'm already starting on a new? I mean... If he say choise 1: "Yes" there comes a new choise menu right away with the new options... How do the game know if I say "No"? That's the part that really are confusing me ( Please say if I explain too bad I know I'm very bad at it )
May 5th 2006, 09:44 PM
spike.gif
If I understand you correctly, this is what you want:

choice_start()
"Choice option 1"
(&condition == 1) "Choice option 2"
"Choice option 3"
choice_end()
int &old_result = &result;

if (&result == 1)
{
// this is for Choice option 1
}

if (&result == 2)
{
// this is for Choice option 2
choice_ start()
"Choice option 4"
"Choice option 5"
choice_end()

if (&result == 1)
{
// this is for Choice option 4
}

if (&result == 2)
{
// this is for Choice option 5
}
}

if (&old_result == 3)
{
// this is for Choice option 3
}

&old_result equals the value of the first &result, so with that we still know what choice the player picked after the second &result overwrites the first.
May 6th 2006, 04:39 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
I tried your idea but it didn't work. The game still don't know when the result 2 for "No" comes because of the "yes" have a choice with a result 2 too..