A downloadable asset pack

Download NowName your own price
This is a dialogue system for GameMaker Studio (1 & 2). It features:
  • Text effects (colours, waves)
  • Words spell out like typewriter
  • Character portraits
  • Character voices
  • Dialogue choices
  • Character emotes

Click here to view/download the asset listing in the GameMaker marketplace. You can use this to download the project contents into your own project, rather than simply downloading my demo project. (Note: only for GMS2. Unfortunately I don't have a license to upload the GMS1 version!)

 CREDITS

The character sprites and portraits in the project/previews were made by Buch. The emotes were by Tomcat94. Also, some of the text effects (wave, colour shift) as well as the code logic I'm using for the effects is from this tutorial by diestware. 

FOREWORD

This has been in the works for ages! I'm unfortunately a bit short for time at the moment, but since I've had a few requests I'm just going to release it into the world as is. Eventually I want to do a proper tutorial on how it works, but for now, I'll just walk you through what you need to know to get it working.

Firstly, the demo project contains the following:

______________________________________________________________________________________

PROJECT CONTENTS

SPRITES

NON ESSENTIAL
  • spr_player - a demo sprite for the player object, in no way essential.
  • spr_examplechar - a demo sprite for an example character.
  • spr_portrait_noone - the default portrait. Not technically essential, but you'll likely want to have something like this in your own project. This is just a one frame, grey portrait.
  • spr_portrait_player - the demo player portrait. This has 3 frames that correspond to the "myEmotion" variable you can set when declaring a dialogue line, with a little picture depicting it as neutral, happy, or sad. Presumably in your own project, you'll want to set your own art. (Or you could just have one frame and not use the emotions functionality.)
  • spr_portrait_examplechar - the demo portrait for the example character. Setup is the same as the spr_portrait_player, just coloured differently.


ESSENTIAL
  • spr_dialoguebox - this is the "box" where the actual dialogue text will appear. While you don't need this particular sprite, you'll need some kind of dialogue box sprite.
  • spr_portraitframe - this is the "frame" that draws on TOP of all of your character portraits. Again, you can replace this with any sprite you want.
  • spr_emotes - this is one sprite with multiple frames, each containing a different emote. They can appear over speakers' heads. If you never use emotes, you could delete this.
  • spr_dialoguefinished - this is the sprite that will be drawn when your text is finished spelling out, to let the player know they can proceed to the next page. Feel free to replace this with your own sprite.  NOTE:  You can use an animated sprite with multiple frames. Refer to section "What You Need To Do" -> "customise spr_dialoguefinished" for more information on customising this sprite's location/animation.

SOUNDS

NON ESSENTIAL
  • snd_voice1 - one of the demo "voices" played during the dialogues. Note that different "voices" are set in speaker objects, so you can have different sounds for different characters.
  • snd_voice2 - another demo voice.
  • snd_select - this plays when there is a player choice dialogue and you confirm your selection.
  • snd_moveselect - this plays when there is a player choice dialogue and you move the selection.
ESSENTIAL
  • None of these are technically essential, and you could remove all of the sound elements from the system if you don't want them. Otherwise, you'll probably want to replace all of these with your own sounds in your project.

SCRIPTS

NON ESSENTIAL
  • create_array - this only comes in the GMS1 file, as IMO it's unnecessary for GMS2. The reason I added this is because while GMS2 lets you declare arrays like: new_array = [entry1, entry2, entry3...], you cannot do this in GMS1. The script serves a very similar function: you would just call: new_array = create_array(entry1, entry2, entry3).
ESSENTIAL
  • create_dialogue - when an object runs this script, it will create an obj_textbox object that belongs to it (this will become its myTextbox object), and then hand over all of its dialogue variables (myText, myPortrait, etc...) to that textbox. This is the script the speaker objects will call. More detail on how this script works below.
  • create_textevent - this is an alternate script for when you want a text event to occur as a once-off, and don't want the obj_textbox to belong to the instance that runs this script. Instead, this script will create a temporary object, an obj_textevent, that will in turn create the obj_textbox. The obj_textevent will destroy itself as soon as its obj_textbox is destroyed. More detail on this script below.
  • reset_dialogue_defaults - this resets all of the dialogue variables. You'll want to call this if you ever want to CHANGE an object's dialogue after you've already declared them. This is because a lot of them are arrays, and if you eg. at first declare five lines of text, then later try to have the object declare one line, it'll keep the last four from the first time. To avoid this, reset to defaults!

FONTS

NON ESSENTIAL
  • fnt_debug - purely for the debug variables. Feel free to delete this.
  • fnt_dialogue - used for all the dialogues in the demo. Note that you can have multiple fonts, and/or fonts for different speakers (declared as myFont = fnt_whatever).
ESSENTIAL
  • None of these are technically essential, but you'll need at least one font to use in the dialogue for this system to work.

OBJECTS

NON ESSENTIAL
  • obj_camera - for moving the view around. This object also declares the first text event you see. Note that it doesn't require any of the variables the speakers need: since it's using create_textevent, it just declares some text in an array, and sets the speaker to "-1" which is the default, and results in the speaker being obj_textevent. The camera is also drawing the debug variables.
  • obj_player - the object controlled by the player in the demo. It has basic movement, and is followed by the camera.  NOTE: the player also has a line of code to prevent it from moving if an obj_textbox exists. You might want to have something like this if you use the same keys for movement as for selecting dialogue options (otherwise the player will move around when hitting these).
  • obj_examplechar - an example of a speaker object. It has some example text. Note that you could declare all of the variables in the create event, but putting it in the ev_user0 allows our dialogue to include or change depending on certain variables.  
ESSENTIAL
  • obj_textbox - the object where all the magic happens. More detail below.
  • obj_textevent - the object that gets created if we create a "textevent" instead of having a speaker object do it. These are destroyed after the event, and allow you to have once-off dialogues.
  • par_speaker - the parent object for the speaker. If you want to be able to walk up to an NPC and talk to it, it will need to be a child of this object. The parent declares the default dialogue variables, and sets up a detection radius for the player (well, I say "radius", but the area is actually a rectangle). If the player is inside the radius and hits the interact_key, a dialogue will begin.
  • obj_emote - this little object gets created if you want an emote to appear over the speaker's head. Note that I'm assuming your objects origins are at the bottom centre; you may have to tweak where these objects appear/update their position to suit your game.

ROOMS

NON ESSENTIAL
  • rm_demo - purely for demo.
ESSENTIAL
  • Not essential.

______________________________________________________________________________________

WHAT YOU NEED TO DO:

Open up the demo project, or import its contents into your own. Replace the sprites, sounds, and fonts with your own assets. Feel free to rename the sprites, but you'll need to update any reference to them.

  • CUSTOMISE SPR_DIALOGUEFINISHED 

As said above, you can use an animated sprite with multiple frames. For GMS2 users: the sprite will animate at the "Speed" the sprite itself is set to in the sprite editor (assumes the mode is frames per second). For GMS1 users: you will have to manually set the animation speed by altering the "finishede_spd" variable in the create event of obj_textbox.

The sprite draws at the co-ordinates (finishede_x, finishede_y), which I have positioned down the bottom right corner of the dialogue box (minus the x and y buffers). Feel free to change these if you want it drawn somewhere else.

NOTE: The origin of my sprite is at the bottom-right corner, thus it appears anchored at the dialogue boxes' bottom right corner. You may want to do this too.

NOTE2: I have added a "shift" to the x co-ordinate of the sprite's position in the Draw GUI event of obj_textbox (down the very bottom). This is to give it a slight "wave" appearance in the horizontal direction. Feel free to remove this.

  • CUSTOMISE PAR_SPEAKER 

As said above, this parent object sets up all the defaults and sets out the code for detecting the interaction with the player. You'll want to:

- Change the playerobject variable to be whatever you've called your player object.  - Change the interact_key to whatever button you want to press to talk to the NPC. It's set to the "E" key by default.  - Set the detection_radius to be however far away to check for the presence of the player. This is used as the "radius" of the rectangle the speaker object checks for the player. 

The myVoicemyPortrait, and myFont variables should be set to some default values. (Note: these could be just -1 like the other defaults, if ALL speakers set their own. But if you want to provide a default for characters, you could do it here.)

  • CREATE YOUR OWN SPEAKER OBJECTS 

If you want to make an object part of the dialogue system as a speaker object, you'll need to make it a child of par_speaker. Remember to put event_inherited() in the create and step events of this object. Otherwise, it won't inherit the necessary code from its parent, such checking for the presence of the player to start the dialogue. A character can have its own voice, font, and portraits sprite. These are set with the variables myVoicemyFont, and myPortrait. You only need to set these once in the create event, and they will be used whenever the object is speaking. Next are the variables that will be dependent on the particular round of dialogue: myTextmySpeakermyTypesmyNextlinemyTextcolmyEmotion, and myEmote. These are all the arguments used in the create_dialogue and create_textevent scripts.  HOWEVER: some of these are optional arguments: the bare minimum to specify is the myText and mySpeaker variables (the rest can use the defaults). So, for simple NPC dialogues, you only need to set these. For example, this is all you need for a simple speaker object: 

    event_inherited();
    myText[0] = "Hello!"; 
    mySpeaker = -1; 

It will inherit the rest of the defaults from its parent.  Be sure to examine the obj_examplechar for how a speaker can work, and also check out the section below on how the scripts work.

  • CUSTOMISE OBJ_TEXTBOX: 

 In it's create event, you'll want to take a look at the variables in the section "Customise (FOR USER)". Anything there, you can change. 

Take careful note of the "scale" variable. This controls the scale of the entire dialogue system. It draws everything in the Draw GUI event so that we avoid positioning the dialogue relative to the view. Generally speaking, the GUI is at a much "larger" scale than the view, so you'll likely need a value above 1. By default, it's set to 3, since the view in the demo project is a third of the viewport. 

The x_buffer and y_buffer variables are for placing the text in the dialogue box. Presumably, you don't want the text right up in the top left corner. These buffer values correspond to the distance the text will sit away from the edges of the box.

NOTE: These should be scaled, so while you can change the numbers, leave the " * scale " multiplier on both of them. The portrait_framedialogue_boxemote_spritechoice_snd_effect, and select_snd_effect are how the textbox will refer to your assets in the code, so that you only have to set these to your own assets once in the create event. 

 The choice_col and select_col are the colours the text will appear when you are selecting a dialogue option.

 Finally, the priority_snd_effect variable is just for setting the priority when using audio_play_sound. It will use this variable as the priority whenever the "voices" are played. Feel free to change this or keep it as is.

  • CUSTOMISE OBJ_TEXTEVENT: 

 Again, you'll want to jump into this object's create event and take a look at the "Customise (FOR USER)" section. This object is the one that is created for a once-off text event, when calling the script create_textevent. The script actually allows you to specify the speaker in this, in the same way as the create_dialogue script. However, if you only supply the minimum arguments (lines of text, and put the speaker as "-1") then it will use the defaults in this object, so you WILL need to set them.

______________________________________________________________________________________

USING TEXT EFFECTS

To use an effect, put "/#" in the string where you want the text to start, where # is a number, and then "/0" when you want to return to normal.

For example:

    "You can apply /2effects/0 to text.";

In the Draw GUI event of obj_textbox, scroll down until you see a long switch(effect) statement. Currently, there are 8 effects:

    0 = normal
    1 = shakey
    2 = wave
    3 = colour shift
    4 = wave and colour shift
    5 = spin
    6 = pulse
    7 = flicker

______________________________________________________________________________________

HOW THE SCRIPTS WORK

CREATE_DIALOGUE

This script takes the form:

     create_dialogue(myText, mySpeaker, myTypes, myNextline, myTextcol, myEmotion, myEmote); 

Most of the arguments are optional. You technically only need to provide the first two arguments, myText and mySpeaker: it will assume the defaults for the rest.

What all the arguments do:

  • myText 

This should be the array of text you want in the dialogue. NOTE: if you want a line to be a dialogue choice, you'll need to put an array of the choices at that line. For example:

    myText[0] = "Hey, what's your favourite colour?";
    myText[1] = ["Red", "Blue", "Green"]; 

The myText[0] entry is a normal line of text, whereas the myText[1] entry stores three dialogue options. You'll need to also set myType[1] = 1 (see myTypes below).

  • mySpeaker 

This should be the array of objects who will say each line. Each entry in this array will correspond to the entry in the myText array. That is, mySpeaker[0] will say line myText[0], and mySpeaker[1] will say myText[1]. If you put "-1" for this argument, the script will automatically make an array for you, where the instance calling this script will be set as the speaker for every line.

  • myTypes

This should be the array of dialogue "types" for each line. There are two "types" of text events in this dialogue system. Type 0 is what you might call "normal" dialogue, whereas Type 1 will be a dialogue choice, where the player is selecting a dialogue option. Note that even if you only have ONE dialogue choice, whereas the other 4 lines are normal, you'll still need to put eg. 

myTypes = [0, 0, 0, 1, 0]; 

 Where the "1" is the entry in the myText array that is the dialogue choice. If you put "-1" for this argument, the script will automatically make an array for you and make every line a Type 0 dialogue.

  • myNextline

This only needs to be set for the entries you have set a dialogue choice (Type 1). At that entry, you need to put an array that stores where you want the next line of dialogue to go to depending on the dialogue choice. Eg, following on from our "favourite colour" example above, you could declare: 

    myText[0] = "Hey, what's your favourite colour?"; 
    myText[1] = ["Red", "Blue", "Green"]; 
    myNextline[1] = [2, 3, 4];
    myText[2] = "Red's pretty hot.";
    myText[3] = "Blue's pretty cool.";
    myText[4] = "Green, like the grass.";
    myNextline[2] = 5;
    myNextline[3] = 5;
    myNextline[4] = 5;
    myText[5] = "Well, bye!"; 

 Note that each dialogue choice sends the dialogue to a different line. And then afterwards, each returns back to line 5. Note: you don't HAVE to have a dialogue choice send the character to a specific line: if you don't want the choice to matter, you don't have to change this variable. Putting nothing or -1 will leave it at its default, and make every line simply proceed to the next.

  • myTextcol

This should be the array of colours that will be used IF you use a text effect in that line. You can only specify one colour per line right now. See more below on text effects. As with the others, you can leave this blank or put -1.

  • myEmotion

This should be an array of "emotions" that correspond to the frame of the portrait sprite for whatever speaker is saying the current dialogue line. Each entry in the array should match the entry in the myText array, etc. You can also just leave this blank or put -1 (ie. if you don't have any "emotions" in your portrait sprites).

  • myEmote

This should be an array of "emotes" that correspond to the frame of the emotes sprite. You can leave this blank or put "-1". If you only want an emote on some lines but not others, put "-1" for the entries you do NOT want an emote.

CREATE_TEXTEVENT

This script takes the form:

create_textevent(myText, mySpeaker, myTypes, myNextline, myTextcol, myEmotion, myEmote); 

The end result will be very similar to if you had declared create_dialogue, except that it also creates an obj_textevent who then creates the obj_textbox. The obj_textevent will destroy itself as soon as the dialogue is finished.

Again, you technically only need to provide the first two arguments, myText and mySpeaker: it will assume the defaults for the rest. The only difference is now, if you put "-1" for the mySpeaker argument, it will set the speaker to an obj_textevent instead of one of your speaker objects. So you can use this event if you don't want to set a particular speaker.

NOTE: you don't need to declare the argument variables (myText, mySpeaker, etc...) to create a dialogue. You can input arrays straight into either script. Here as an example:

    var oc = obj_creature;
    var og = obj_greenking;
    var op = obj_player;
    var c = c_white;
    create_dialogue(
    [
        "Sorry Green King, but I'm /4way cooler/0 than you.",
        "Wait, /1WHAT/0?",
        "I'm the Green King. /1No-one's/0 cooler than me.",
        "What do you think, Red King?",
        ["Blue Knight is cooler.", "Green King is cooler."],
        "/5Haha/0, see?",
        "Tch...",
        "/6HA/0! It's as I said.",
        "Aw..."
    ],
    [oc, og, og, oc, op, oc, og, og, oc],
    [0,0,0,0,1,0,0,0,0],
    [0,0,0,0, [5, 7], 0,-1,0,-1],
    [c,c_red,c_red,c,c,c_aqua,c,c_lime,c],
    [0, 3, 2, 1, 0, 5, 3, 1, 2],
    [-1,4, 3, 1,-1, 1, 3, 1, 2]
    );

NOTE2: If you're using GMS1, the [entry1, entry2, etc] format will NOT work. You will have to instead use the included script create_array(entry1, entry2, etc). More info below.

RESET_DIALOGUE_DEFAULTS

This script takes no arguments, it simply resets all of the dialogue variables to their defaults (as if you had created the object fresh).

You will want to call this in any speaker object if you have already declared a bunch of myText/mySpeaker/myEmotions etc for a different dialogue. These variables will be arrays filled with entries, and you will have to delete them if you want to "start fresh" (otherwise they will keep values from the old declaration!).

So, if you want to change those variables in your character at some point, be sure to call reset_dialogue_defaults() before proceeding to set them again.

CREATE_ARRAY

As said above, this only comes in the GMS1 file - GMS2 already has simliar functionality. In GMS2, you can declare arrays like this:

    new_array = [entry1, entry2, entry3...]; 

But you cannot do this in GMS1. So that you don't have to go through the hassle of declaring each entry (new_array[0] = entry1, new_array[1] = entry2, etc), I added this script. Now you can just call: 

new_array = create_array(entry1, entry2, entry3).

More information

Published 15 days ago
StatusReleased
CategoryAssets
Rating
(3)
Authorfriendlycosmonaut
Tagsassets, dialogue, GameMaker, tools

Download

Download NowName your own price

Click download now to get access to the following files:

DialogueSystem_v102_GMS2.yyz 156 kB
DialogueSystem_v102_GMS1.gmz 67 kB

Development log

Comments

Log in with your itch.io account to leave a comment.

(Edited 1 time)

Why The GMS 1 version throws this error ?:

___________________________________________
#######################################################################
FATAL ERROR in
action number 1
of Alarm Event for alarm 0
for object obj_textbox:

illegal array use
 at gml_Object_obj_textbox_ObjAlarm0_1 (line 73) - if(emotes != -1 and emotes[page] != -1){
#######################################################################

Did this error throw after you customised/added your own kind of text event? I can't be sure without seeing your code, but I'd say it's because it doesn't have the right number of arguments for the "emotes" part. Make sure you fill all of the arrays with the same number of arguments.

If you're still having trouble, feel free to e-mail me your project at friendlycosmonaut@gmail.com and I can take a look.

(Edited 2 times)

i just imported the file to a new project, and when i ran the game the problem popped up.

Sorry I've just done the same thing and can't seem to reproduce the error. But maybe some of the assets are missing?

I think there isn't any asset missing. I Just Download the GMS1 Version, and imported it to a fresh project. First a got the error from instance_destroy(myTextbox), but after i solved that i got the array error that i mentioned on my first comment, i dunno what to do.

(+1)

Hmmm I'm not sure why that would be. I'm going to upload a new version in a few days, so hopefully it will work then.

Wow! I just cannot believe how wonderful you are! This is the best dialogue solution out there, and I did spend a lot of time searching.

I have just two questions/concerns:

1. Would it be possible to log player choices in dialogue for later use? Right now they can't be used ingame except for immediate branching in the same dialogue. Also it'd be great if you could activate different scripts during dialogue, for example, give the player a new item on line 3, and move NPC on line 13, etc.

2. Alough it looks PERFECT, the in-code solution is actually not pretty - importing your dialogue to script is a lot of pain... with like ~10 lines of code for each dialogue line, or keeping track of ~5 long array every time... Would it be possible to optimize this somehow so that we could make coding the actual dialogue easier? Would be perfect if you could just write all the variables needed in one line, like you can do in Visual Novels, etc, like this:

DialogueLine(spr_nancy_happy, X, Y, Z, effects variables etc..., "Look how happy I am!");

I've seen other engines do it, do you think it would be possible at all?

Thank you!

1) Yes I'm working on including an argument in the script that allows you to change a variable according to the player's choice. That'll be in the next version, along with some stuff for animated portraits!

2) I'm not 100% sure what you mean. Are you saying you'd prefer to input each line individually, instead of all at once in the create_dialogue script?

Ahh! Sorry I've confused you!

Here is what I meant, I hope it will be easier to understand:

Currently I think there's a few ways to write dialogue in-script:
1) create_dialogue(choose text and variables) - easy for one-liners, but won't work with several lines... if there is a way, please tell me how!
2) like in GML example file - inside speaker object create user event and pase all variables for each line separately (this way each line of dialogue will require 6 lines of code, which is very hard to write)
3) like in the tutorial above - one create_dialogue with huge arrays inside. pretty hard to follow and keep track of as you need to track the lines and their parameters across several arrays manually...

I'd like to have an option # 4 with writing each line as a full create_dialogue script:
create_dialogue("Hello", Speaker1, spr_spk1_portrait1, etc);
create_dialogue("Good day!", Speaker2, spr_spk2_portrait1, etc);
(etc)

And also option # 5 would be great: writing all text in the separete script so that ALL game text will be locked inside one script file and called from outside (this is important for text-heavy games - for localization and organization functions). So the dialogue will read as (sorry for bad examples):

global.txt[1] = "Hello";

global.txt[15] = "Good day!";

create_dialogue(global.txt[1], Speaker1, ...etc);
create_dialogue(global.txt[15], Speaker2, ...etc);

Do you think it will be possible to implement? This would be really great for text heavy games I think!!

I was also thinking about additional helpful improvements I hope you'll consider!
1)Triggering dialogue without hitbox collision but instead only if you're facing the interactable solid object (with instance_place I think?) so you won't be able to interact with objects by standing in the far corner of their collision box and facing the other way, which is currently a bit weird!
2) Displaying speaker name!
3) Different audio effects for different characters/lines
4) Different speed for different lines
5) Trigger world events during dialogue (movement, execute scripts, change variables, etc)

Thanks again for your great work! Please tell me if you'll consider some of this, it will make me very happy :)) I'd do it myself but I'm pretty bad at scripting for now. Also I think you could release an updated version as a paid marketplace asset, it's really good!

also, is there a good way of changing variables and things based on choices? kind of hard to use them in a game otherwise

Ah yeah at the moment you'd have to fiddle with the system yourself to grab what choice the player has made -- but I'm planning to release a new version in a few days that'll make this easier. 

my own attempts at making text boxes and stuff were just modified crawling text objects that had an array id have to customise manually (and destroys itself if the string is "" it worked pretty well in my small nsfw uno game

the gms1 version has a mistake in it

instance_destroy() has to be called as a function with no arguments

so id change it to this

 if(myTextbox != noone){
    with myTextbox{
        instance_destroy()};
        myTextbox = noone;

(Edited 1 time)

Actually this isn't a mistake; the function has an optional argument. Its default is just to destroy the calling instance, but you can destroy a specific instance other than the calling one via the optional argument. This is according to the GameMaker documentation on the function.

As far as I know this has never caused me any problems -- have you encountered some errors?

it flagged as an error the second i opened it and it wouldnt run until i removed it

wrong number of arguments

Oh, how weird!

not weird to me, in all the versions of game maker i had all of them had instance_destroy() with an error thrown if you put something in it

if the code is instance_destroy(a), doesn't a : 

with(a) instance_destroy(); 

be enough to make things right ??

(Edited 1 time)

This is wonderful! :) Thank you so much for making and sharing with us. 

For some reason when I import it into my existing project, and run it, the text boxes aren't appearing. I have an object set up to trigger a textevent when the player object collides with it, and I can hear the sound effects playing, and when I press E, I can hear that it's going to the next section, but I still can't see anything. Any ideas why? Sorry, I know that's kind of vague, but if there's any other info I can give you to help you help me, please let me know!

(Edited 1 time)

Thank you :)!

Hmm, off the top of my head, it might have something to do with what layer you're creating the textboxes in (if you're using GMS2) or what depth (if you're using GMS1). It may be that the textboxes are getting drawn "under" everything.

Otherwise I think I'd have to know more about your project/see it for myself and tinker with the code. Feel free to send me the project file/additional info at friendlycosmonaut@gmail.com, or hit me up on Discord if you'd prefer a chat (FriendlyCosmonaut#1735)!

Thanks heaps! :) I'll shoot you an email with my project.

So I managed to get the text box to display by turning off this CRT shader I'm using. But it's very tiny - I'm assuming that's because of the scaling options in the Create event of the obj_textbox, so I just need to tweak those a little. 

Thanks for making this - works really well

No worries! Feel free to throw screenshots at me if you put it into use :)

of course - quick question, do you think the best way of adding new events to this system would be by modifying the “type” variable, with 0 currently being normal and 1 being dialogue options, could I add a type 2 for a personal function like spawning a new object in the room for example?

Ahh that's an interesting one. You definitely could do it with the "type" argument. So then you could jump into the step event and expand the if/else statement to include another check. And what I think I'd do, so that you could use this for a few things, is make our third "type" run whatever script you input into text[page] for that line.

So here's some pseudo code:

if(type[page] == 0) { 
    //normal
} else if(type[page] == 1) {
    //dialogue choice
} else {
    execute_script(text[page]);
    page++;
}

So basically it runs that script and then immediately begins the next line. Or, you could make it wait some time before beginning the next page, ie. by setting of an alarm like if(alarm[3] != -1){ alarm[3] = room_speed; }.

Note that you'll also have to change the "else" in the Draw event to specifically check else if(type[page] == 0), because at the moment it just runs if text[page] isn't 1. Also, depending on what you want, you might still want to have some specific thing that it's drawing - at the moment, it'll draw nothing while we're in this "type" of event. So you might want to get it to keep drawing the text from last time, or just an empty textbox, etc.

Hope that makes sense!

Looks great I'll try it out tonight thanks again

Thank you so much!

You're welcome! :)

Oh it GMS2. I guess it doesn't work for GMS1

I've added a file for GMS1 :)

Wow, this looks slick! Will it work with Studio 1? If so, I'm now torn between continuing to follow your tutorials for dialogue and just being able to skip that and get on with the rest of the game by just using this! Eep! :)

Thank you! I've just uploaded a version for GMS1. Haha, that's always a tough choice. But feel completely free to just use it and go ahead with your game, especially if you're relatively new to coding - this one just about did my head in to make with all the effects and optional arguments and blargh. 

Too many people hit roadblocks in their development and quit projects - I think you should just use whatever you can to make progress. And feel totally free to contact me if you have any troubles!

Thanks! Even though I've not yet decided whether to use this or use your tutorials to build my own system I will try this out as well and see if I can get it to work and manage to customise it to how I'd like :)

The only thing is, I've never imported anybody else's assets/projects before. I remember attempting it once and completely failing, whenever I did 'import' it just opened closed my current project and opened the downloaded assets project on its own. Do you know how to import assets into an existing GMS1 project? Also, if you were to update this project after I'd done so, would it be very difficult for me to get the update, or would I have to do re-do every step again and any changes I'd made.

Thank you!

Ps. I like how there's the option to answer people/choose replies. :) I think that aside from the option to enter text (I was going to have an option to name a cat and have the cat's name be referenced occasionally) this has everything. :) In fact, it's probably not worth the hassle of me even trying to figure out the cat thing since I'd probably only be using such a mechanic once or twice. Maybe I'll just have its name be multiple choice! xD

Also, this entire page is well put together. Like the nice gifs, were they easy to make? :)

Ahh yeah importing things into GameMaker (both 1 and 2) can cause quite the headache. There is a way to import things into a pre-existing project as a resource via the marketplace, which I have done for the GMS2 version, but unfortunately I don't have a GMS1 license to upload to the marketplace. So the next best thing would be to download the demo, and then add the assets to your own project by (for example, for an object):

Right click on the "Objects" folder -> click "Add Existing" -> Locate the folder where the demo .gmx is -> objects -> open each object.

Unfortunately this manual loading takes a bit of time, but I'm not aware of any other method (I would love to be corrected though!). 

Haha yeah I love dialogue options! There could be a way to allow text input at some previous stage, that is saved into a variable, and then you can add THAT variable to the string (you can piece strings together like: "my cat is named " + cat_name + " and they're adorable!".

Thanks so much :)! To be honest, I'm pretty terrible at making gifs. I use GifCam to record them - though half the time they come up with weird pixelation or distortions!

(Edited 1 time)

Arghh! Itch.io never seems to tell me when you reply to one of my comments! Not with an email and not even with a notification when I log in! I only realised you'd replied because I went directly to look at my comment again!

Ah that sounds easy for me to screw up, knowing me! :) Maybe if I import all of the objects (and sprites/sounds/scripts too?) to their own separate folder within my project it will be easier to see I've imported everything successfully. Perhaps I'll wait to try it until you do you update (I saw you mention an update in a comment above), because changing a local/global variable based upon a selected answer would probably be a thing I'd use. :)

I don't know much about uploading to the marketplace, but I know somebody who bought a copy of GMS1 through the Humble Bundle and then realised it's not for Macs and never used it and probably won't ever. I wonder if licenses can be transferred or gifted through Humble Bundle or the GMS website...  Maybe she'd be willing to do that. Although I thought standard GMS1 was free now? I guess I don't know much about how the  marketplace works, perhaps it's a different thing altogether! I think a lot of people still use GMS1? and your dialogue system looks like the best thing out there, so it's a pity it's not on the marketplace, but still really great that it's available here. :)

I guess with entering text, as I don't think it's an option in this dialogue system? I was worried that whatever text-entering system I created myself wouldn't match the visuals of this system, but I forgot that I'd probably want to restyle this system (even though it looks nice already) just to make it unique to my game, so maybe they wouldn't be so difficult to match up after all. :)