Question: Dialouge [SOLVED]

Thecasius

  • Posts: 39
Im working on my 2D sidescroller and i wonder if its possible to make dialouge with/without cutscenes, and if it is possible to make dialouge options that will/wont change the gameplay, im thinking more like questions and such things, of curse a responding dialouge.

It would be nice if any of you guys could answer me, and if you have some link to video or text please link it in your replie(s)

« Last Edit: July 17, 2013, 12:39:45 pm by Thecasius »
Well, you should not be reading this, if you want too alright but dont blame me.

I used to be an adventurer like you, then i took two barrels, damn i dont know. Skyrim is complicated, beside that im a mage, cuz im always a mage.

boon

  • *
  • Posts: 2
There is not a premade solution, no.  (Trust me, I checked about 2 minutes ago.)  However, you could make your own system for dialogue.  Here's how I did mine in AS3 (Flixel)...

I had a dialogue class that was called from an NPC object.  When the dialogue method shoots, the game alternates to another update function that only specific objects have.  That feature is so I can have certain animations and other things still running during the dialogue.  You never truly want to pause everything in a game.  Anyway, whenever the dialogue class closed or finished what it was doing, it would call a function/method from the NPC object's code.  That function would then call the dialogue class' function for updating the dialogue... if there are any dialogue lines left.

Hope that helps. :-X

Meestar

  • Posts: 654
I have no idea where it is that boon was attempting to find a dialogue system, because there are a ton of them up on Stencylforge, including one that I made.  To locate the Stencylforge, simply open up Stencyl, click on View, then click on Stencylforge.  Then you can search for behaviors and games and all kinds of other resources.  My dialogue system can be found by searching Games for Mee - Dialogue.
PM me if you require help.  I'm always glad to help out!

Thecasius

  • Posts: 39
I have no idea where it is that boon was attempting to find a dialogue system, because there are a ton of them up on Stencylforge, including one that I made.  To locate the Stencylforge, simply open up Stencyl, click on View, then click on Stencylforge.  Then you can search for behaviors and games and all kinds of other resources.  My dialogue system can be found by searching Games for Mee - Dialogue.

Thanks, i appreciate your help, though my question was if i could have a dialouge like in skyrim and walking dead, howewer thank anyway
Well, you should not be reading this, if you want too alright but dont blame me.

I used to be an adventurer like you, then i took two barrels, damn i dont know. Skyrim is complicated, beside that im a mage, cuz im always a mage.

Thecasius

  • Posts: 39
There is not a premade solution, no.  (Trust me, I checked about 2 minutes ago.)  However, you could make your own system for dialogue.  Here's how I did mine in AS3 (Flixel)...

I had a dialogue class that was called from an NPC object.  When the dialogue method shoots, the game alternates to another update function that only specific objects have.  That feature is so I can have certain animations and other things still running during the dialogue.  You never truly want to pause everything in a game.  Anyway, whenever the dialogue class closed or finished what it was doing, it would call a function/method from the NPC object's code.  That function would then call the dialogue class' function for updating the dialogue... if there are any dialogue lines left.

Hope that helps. :-X

Thanks for your long and detailed walktrough, but my question was, if you could make a dialouge like in skyrim or walking dead, and could you please make a step-to-step thingy walktrough for me? And do you know anything about thoose dialouges i mentioned?

And thanks for your help :)
Well, you should not be reading this, if you want too alright but dont blame me.

I used to be an adventurer like you, then i took two barrels, damn i dont know. Skyrim is complicated, beside that im a mage, cuz im always a mage.

Meestar

  • Posts: 654
What you are asking for is a very complex system.  It's possible, but it is very difficult.  I wont go through how to make the entire thing, but you basically need to create a dialogue system (or borrow one from the Stencylforge) and make some mods to it.  You would store dialogue into a list as text.  You would also store special parameters into the text string that tells the system what to do.  For instance, let's say that I am displaying four lines of dialogue at a time.  On the first line I would have something like this:
2_Yes_No_acceptQuest_rejectQuest_Hey there adventurer! Have you got a moment?
I could really use your help with something of the utmost importance!

There we have two lines of dialogue.  Then we'd need to split the text in line one into a separate list so that we can analyze it.  We would split it at the _.  Next, we'd check to see the item at list position 0, which would be the 2.  This signifies that we will have 2 possible choices.  That also tells the dialogue to check the next 4 parameters.

So, now that we know we have 2 choices, we move on to list object #1, which is Yes.  This will generate a button on screen with the text Yes.  We send to that Yes Button parameter #3 which tells it to trigger event acceptQuest, when pressed, in all behaviors for our NPC.  We then create the next button, No, which triggers rejectQuest.

Finally, we have the normal line of text which our npc will say.  So, the final result of this code would look something like this in the dialogue box:

Hey there adventurer! Have you got a moment?
I could really use your help with something of the utmost importance!
1. Yes
2. No

Then, when the player clicks on acceptQuest or rejectQuest, you have the dialogue skip to the required position in the dialogue list to display the appropriate response, or you use a separate list of dialogue for that.

Like I said, it is a very complicated system.  If you don't understand a single thing that I said, you probably need more experience with Stencyl.
PM me if you require help.  I'm always glad to help out!

Thecasius

  • Posts: 39
What you are asking for is a very complex system.  It's possible, but it is very difficult.  I wont go through how to make the entire thing, but you basically need to create a dialogue system (or borrow one from the Stencylforge) and make some mods to it.  You would store dialogue into a list as text.  You would also store special parameters into the text string that tells the system what to do.  For instance, let's say that I am displaying four lines of dialogue at a time.  On the first line I would have something like this:
2_Yes_No_acceptQuest_rejectQuest_Hey there adventurer! Have you got a moment?
I could really use your help with something of the utmost importance!

There we have two lines of dialogue.  Then we'd need to split the text in line one into a separate list so that we can analyze it.  We would split it at the _.  Next, we'd check to see the item at list position 0, which would be the 2.  This signifies that we will have 2 possible choices.  That also tells the dialogue to check the next 4 parameters.

So, now that we know we have 2 choices, we move on to list object #1, which is Yes.  This will generate a button on screen with the text Yes.  We send to that Yes Button parameter #3 which tells it to trigger event acceptQuest, when pressed, in all behaviors for our NPC.  We then create the next button, No, which triggers rejectQuest.

Finally, we have the normal line of text which our npc will say.  So, the final result of this code would look something like this in the dialogue box:

Hey there adventurer! Have you got a moment?
I could really use your help with something of the utmost importance!
1. Yes
2. No

Then, when the player clicks on acceptQuest or rejectQuest, you have the dialogue skip to the required position in the dialogue list to display the appropriate response, or you use a separate list of dialogue for that.

Like I said, it is a very complicated system.  If you don't understand a single thing that I said, you probably need more experience with Stencyl.

Thanks a lot that you took your time!
Man i appreciate it!! I will list you in the credits (seriously)
I had no idea how to even start, but now i know how to start at least :)

Man thanks again :)
Well, you should not be reading this, if you want too alright but dont blame me.

I used to be an adventurer like you, then i took two barrels, damn i dont know. Skyrim is complicated, beside that im a mage, cuz im always a mage.