Dialogue System Template (Templates)

  • There is no reason why it wouldn't work with iOS, Android or any other export option as it uses only basic C2 features. However, I never tested it, so don't take my word for granted.

    A video tutorial would be a great idea, but unfortunately, I can't speak English for the life of me... maybe an annotated video would suffice ?

  • Hi Magistross, yes an annotated video would be wonderful!

  • hey Magistross !

    tried out the latest version and its looking real nice!

    love the ability to now have all my dialogue organized in a google drive spreadsheet.

    also the {actions} and fork are great to have! opened up the possibilities a lot!

  • I just bought this system, it looks great, I'm excited to get it up and running but hitting a wall.

    I followed your steps to add the event to my own new project. Calling the start dialogue function is still not doing anything for me. Could you please add an example capx or at least a screenshot of how a dialogue box is called? Then I can at least compare and figure out what part of this I'm not getting.

  • funcooker

    There are basically two way to handle the dialogue initiating. You can either load the DialogueData array before each dialogue with JSON (preferably pre-loaded) and then call the "Dialogue_Start()" function with no parameter on any event of your choice. Or, you can use the DialogueDictionary, pre-loaded with JSON data, and use the "Dialogue_Start(key)" function, with key being the name of the dialogue to start, the DialogueData will then automatically be loaded with the data associated to that key from the dictionary.

    Here's a very basic screenshot of an example using the DialogueData array.

    You should usually pre-load the data though, and store it so you don't have to go through the AJAX routine to start a dialogue. Or simply use the DialogueDictionary method, only one AJAX call is needed in this case.

    There are also a few other considerations to have. The default layer for the system is "HUD", so you need a layer with name in your layouts, otherwise nothing will happen. If you have scrolling in your layouts, then the HUD layer should also have correct parallax settings so that dialogue still appear wherever the screen is scrolled to.

  • Hello Magistross,

    I have few questions regarding your dialogue system:

    • is it possible to play a sound for each letter shown, like seen in some RPG (earthbound, golden sun, etc)

    Examples : Golden sun :

    Subscribe to Construct videos now

    Earthbound : https://youtu.be/Q7LGGMK8-WY?t=1m22s

    • Is it possible to add some text effects? Like shaking text, or wave animation?

    Thanks!

  • Hi Flodcp, thank you for your interest in my template !

    Good questions you have there.

    Adding sound effects for each letter shown is dead easy. Adding a "play sound" at event 81 of the "DialogueEvents" sheet could suffice. However, it could lead to unwanted behavior like tons of sounds playing at once for instant text (delay = 0) or skipped sequence, sometimes the event not really fetching a new char since it's in a "wait" state (Dialogue_Timer > 0), or even the last char fetched that shouldn't trigger a sound since it's basically a EOF (Dialogue_CharIndex = len(AllText)). Having said all that, you can create a sub-event directly under 81 that would deal with all those cases.

    Here's a screenshot of what event and where would it be optimal to place it :

    The local static variable make sure that no sound plays twice in a single tick, so it single-handedly deals with most of the previous issues I mentionned.

    (As a side note, the examples you provided use a different approach than "play a sound for each letter", I can't say for sure, but I believe they are "playing a repeating sound while text is writing". It could be achieved too with my template, but it would be quite different than what I explained)

    For visual effect, the only avenue for us is to use WebGL effects. However, those effects are applied to the spritefont texture as a whole and thus you won't obtain a cool shaky effect on individual characters like in your examples. One possible way to implement WebGL effects would be to add all the desired ones to the spritefont object and activate them with new text commands like {wave}.

    Hope this helps !

  • Thanks a lot for your answer! I'll take a look in detail in your proposition.

  • This is an excellent template. Congrats!

  • hey Magistross !! look what I did using your template ;D https://www.scirra.com/arcade/shooting-games/2ws-2856

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hey Magistross !! look what I did using your template ;D https://www.scirra.com/arcade/shooting-games/2ws-2856

    That's quite impressive! Nice work adapting the template to your style too, it fits seamlessly!

  • Hi Magistross! Just bought your template last night.

    So i have a question on

    [quote:31toi6ho]5. Be sure to have a "HUD" layout in all your layouts where you need dialogues. (You can also define your own layer by changing the "DIALOGUE_LAYER" constant)

    .

    what does this mean?

  • Typo, I meant "HUD" layer in all layout, sorry. I guess a global layer could work too.

  • alright thanks ....so i got most of the part done....

    how do i use this template?

    In order for me to write my own dialogue i have to use the utililty right? After i have done that what should i do?

    and i cant understand what you mean by this:

    [quote:1qx00uvn]Oh, forgot about that part. The JSON file must be loaded via the "Load" action of the "DialogueDictionary". Best if you add the JSON file as a project file too first. There's probably a tutorial on how to load an external file somewhere but basically all you have to do is use the AJAX object, request a project file, and "Load" the AJAX.LastData inside the Dictionary with a "on request complete" event.

    oh and another thing, what would i do if i want to from sequence 1 to sequence 2 automatically..Only player have to wait for a few seconds?

    sorry...im new to this Construct and coding thing..

  • The utility definitely help to create and test dialogues, but its most useful capability is to export to a JSON file. It's that particular file that must be added to your project and then loaded via AJAX.

    For your last question, the text function {wait:3000} and {next} can be combined so it will automatically go to sequence 2 after 3 seconds. (3000 milliseconds).

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