Dialogue System Template (Templates)

3 favourites
From the Asset Store
Template for a generic save / load system, fully documented in comments and video
  • here's the breakdown of what you should do :

    1. Copy these objects to your project (an event-less layout works wonder, like the "Dummy" layout) : ContinueIndicator, PortraitSprite, SpriteFont, WindowFrame

    (edit: Version 1.02 now needs additional objects : UpArrow, DownArrow, ChoiceSelector)

    2. Create these objects and name them like so :

    1 Array Object named "DialogueData"

    1 Dictionnary Object named "DialogueDictionary"

    1 Dictionnary Object named "DialogueCommands"

    1 Dictionnary Object named "GameVariables" (this is where you game should store its variables, so that dialogues can fetch them)

    1 Function Object named "Function" (default)

    3. Create a new event sheet, and copy over all the content from the "DialogueEvents" sheet from the template. If all objects were correctly copied / created, it should give no error message.

    I did all this and I am embarrassed to admit I am getting an error message doing step 3...

    Any help would be appreciated- purchased tonight and excited to get it incorporated into my game. Thanks!

    Edit: -I figured it out... Copied in pieces, starting with the variable on top which is what was missing in the error message. I got too excited I ran to the forums before reading and trying to figure it out myself... Thanks anyway! I am sure Ill have some questions shortly.

  • Glad you figured it out on your own. I might as well edit the post you quoted to so to specify that variables should be copied over before the rest of the events. I'll be sure to answer any further question!

  • I notice your file has a huge list of Object Types added- From Ajax, Audio, Browser, to Touch. Which of these (if not all) are required to properly use this? Should we make sure the project we want to use this in has all of these added? (Also I noticed I had to add some of these before copying over the DialogEvents successfully.) A readme file included in the .zip with install instructions would be very helpful- and maybe consider adding a list of all the object types needed. Going to bed but ill keep trying to get it working tomorrow. Thanks

  • Yes indeed, a lot of new objects made their way into the template as it grew from version to version. A few objects are mandatory, like the "Browser" object for expression evaluating and "Sound" object to play sound and music with text commands. The "Touch" object is there to enable choice selection with a tap gesture, it can be safely omited along with event 76 and its sub-events.

    The other object types are for the utility, and the "UtilityEvents" event sheet are not at all required inside your project, but it can provide some clues as to how to handle dialogue data loading and how to start and execute actual dialogues.

  • Another question from me-

    I got everything working awesomely with the dictionary loading multiple different dialog sequences etc. Amazing! So fluid!

    So now Im trying to do something somebody else asked about earlier- trigger animations inbetween dialog windows. I first added the Command in the DialogEvents to trigger a function as follows (doubt this is "best practice" ):

    Then I created a "No Text Box" dialog sequence in the dictionary file (which pauses and works great)

    Then I defined the function in another events sheet- which does not appear to get triggered - neither one of these did anything:

    Any help / Advice here will be greatly appreciated! Thanks!

  • Hey Magistross

    Thanks for such a quick reply bud - I don't know how I missed the text commands group, I feel daft now. That worked great, I added commands to select an object from a variable and then move it, change its current animation etc... so now I can just write up entire cutscenes in the dialogue and call them when needed, which is super handy.

    Thanks again!

    This is exactly what I am trying to do- any chance you could share a screen shot of how you accomplished it?

  • Well, I can't say for sure why it doesn't do anything but I'll go with a basic round down of what to do to debug something like this.

    First, if the new event sheet is not tied to any layout, or tied to another layout, be sure to include it in the layout you are currently using for your tests. When everything seems in order, try to set text on screen, do some "Browser" alert or log to console within the "guardGun" function. If nothing happens, you'll know for sure that the event isn't triggered, and you'll probably need to review the "pullGun" command (although it looks pretty straightforward ). If you can see it triggered, but didn't seem to affect the guard sprite, it's either a picking problem, or there is another event that overrides the guard animation.

    Le me know if you still can't resolve your issue.

  • its working now! Im golden. Thanks!

    See for yourself https://dl.dropboxusercontent.com/u/24751251/media/ice_video_20160622-141316.webm

  • Hahaha ! Loved those kind of games that punished you harshly for being a jackass!

  • 2 more questions

    Question 1:

    How do you check a variable within a fork?

    I have a variable "hasappointment" .I set it to 1 when he does and 0 when he doesnt

    here is what the dialog sequence says:

    {setdelay:0}-Guard Chief Bruno-{setdelay:50}

    Checking... {#hasappointment}{pause}{fork:{#hasappointment}=1,12,11}

    I was going off of the money checking example that was there before. Maybe that was not just checking a variable. I want it to go to dialog 12 if "hasappointment" is set to 1. If not, then go to 11.

    Question 2

    is there a way to call another sequence from the end of another sequence? for example- say at the root I have a bunch of questions on sequence2. After every answer instead of ending after he answers the question, id like to go back to that sequence2 so they can ask other questions. Is there an easy way to do that? I tried the ::2 at the end like you see in the choice example but that didnt seam to do anything. Thanks in advance! Sorry for hounding you with so many questions!

    Something like this:

    s1 - hello how can I help you?

    s2 - choice:

    what am I supposed to do?

    tell me about this place?

    why are you so ugly?

    How long have you been standing there?

    I must be going now.

    s3 - answer / return to s2

    s4 - answer / return to s2

    s5 - answer / return to s2

    s6 - answer / return to s2

    s7 - ok, bye {end}

  • The fork expression evaluation is done through a javascript eval() call, so you must use a proper javascript syntax. Equality operator in javascript is "==", so you should go with {fork:{#hasappointment}==1,12,11}. If you ever tried to do equality comparison with strings, things would be a bit more complicated, but still feasible : {fork:'{#hasappointment}'=='yes',12,11}. Notice the quotes around the variable expression and around the "yes", they are mandatory otherwise the eval() function will think those strings are javascript variables, and crash. Note that double quotes would work too.

    I thought about adding a command like "goto sequence 2", but somehow never went with it. It's fairly simple though, it's basically the fork command all over again but with no evaluation, and only one possible "path". You can even do it with the fork command as it is. Something like {fork:1,2} would jump back to sequence 2. Or {fork:1,"dialogue2"} would start the "dialogue2" dialogue from the dictionary. The "1" there is basically an "always true" condition, thus no "else" part is necessary.

    Hopefully my answers will help you continue your awesome game!

  • Perfect! Thanks again for a prompt reply!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I tested the demo,it is not well supported Japanese Charaters.

  • I tested the demo,it is not well supported Japanese Charaters.

    ndeed, the demo only support a limited character range. However, the SpriteFont that is used to display the text can be modified to support any character. This little program made by blackhornet should come in handy when creating a new spritefont out of japanese characters (or any character for that matter).

  • > I tested the demo,it is not well supported Japanese Charaters.

    > ndeed, the demo only support a limited character range. However, the SpriteFont that is used to display the text can be modified to support any character. This little scirra.com/forum/sprite-font-generator-v2_t86546 program made by blackhornet should come in handy when creating a new spritefont out of japanese characters (or any character for that matter).

    Thank you for your reply.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)