Legacy GM Easy Branching Dialogue System

No problem, mycelia!

I hope it's alright to show everyone what I'm using this lovely text engine in,

I've been steadily tweaking the text box and come across a few issues. Such as wanting to slow down the typewriting speed. I found this:
Code:
textSpeed=1;             //speed at which text typwriter effect goes. Can be changed with [speed=x] tags
Where do I put the speed tag? As putting in the parNPC code will just make said npc start moving, not the text itself. Changing the number on textSpeed doesn't seem to affect it either.
You change these variables in the editor itself!
Let's say you have a text Node that has this:
Code:
Hello world!
If you want to make the text-typewriter effect to go slower, then you just have to change it to something like this:
Code:
[speed=0.5]Hello world![/speed]
The rest of the commands, for text effects, can be found in the manual (near the end)


edit:
If you want to slow down the type-writer effect globally, then you can edit the drawGUI event in the parNPC. There should be a line that looks like this (around line 53):
Code:
dialougeTextOn+=textSpeed
Just do something like this:
Code:
dialougeTextOn+=textSpeed/2
 
Last edited:
Q

Quailfail

Guest
Awesome, thank you. I tried in the editor but forgot that it only works in the text node (I tried in a script node hoping it could cover the entire conversation but nope!).

Do you have plans for having a way so it could be for an entire conversation (so switch nodes could be counted as well)? If not, that's alright.
 
Awesome, thank you. I tried in the editor but forgot that it only works in the text node (I tried in a script node hoping it could cover the entire conversation but nope!).

Do you have plans for having a way so it could be for an entire conversation (so switch nodes could be counted as well)? If not, that's alright.
You can do the tags in the switch nodes, but it won't syntax highlight them (will fix this)
I will work on getting so you can set the default values for the text effects
 

mycelia

Member
Me again! I'm having label issues.

Basically what I'm trying to do is: I have three possible options. Sometimes one or two of these options should be hidden. I decided to write a script that returns a different number depending on which options should be visible, then the idea was to use that to point to labels that would correspond to switch statements with the correct dialogue options. Problem 1: when I export it, either only the label-pointing scripts appear, or only the switch statements appear. Problem 2: no matter how often I save and how many different filenames I use, when I open any of them they revert back to a single switch statement. I am extremely confused and frustrated.

Possibly the quest or convo system could help, but I'm a little unclear on how either of them work. Also, if someone could post their exported file that uses labels properly, I can probably reverse-engineer them.
 
Q

Quailfail

Guest
If you download NoobsWeStand's latest GMX example (the 185kb link) access the files. Go to datafiles (called Included Files in GM:S when open) then Dialog. In there will be 2 ini files (save1 and save2) that you can open up in the Dialog Engine and see how it works.

As for creating separate conversations and quests, that's where that button "CreateConvo" is for. If you click on that then click on your desired branch you will see said conversation enclosed in a new box that will have QuestID and QuestON. The numbers you put into those two is how you call those conversations, such as convo(0,1) or scr_changeQuest(0,2).
 

mycelia

Member
Thanks! I...mostly figured it out. Basically, using a bunch of scripts in a row gets complicated, but NoobsWeStand reckoned he could fix it in the next update.

And speaking of which! I am very selfishly going to make a request: the addition of a script command that can change dialog sprite and name mid-conversation (to have the NPC change emotions, or go from ??? to their name when they introduce themself.) I'm gonna poke around in the source code and see what I can come up with in the meantime.
 
P

PopatoChisp

Guest
Is it possible for me to change this part,
Code:
///CollisionWithPlayer

if showText2=true{
    if place_meeting(x,y,objPlayer){
        showText=true
    }else{
        showText=false
    }
}else{
    showText=false
    if keyboard_check_released(vk_space)
    && place_meeting(x,y,objPlayer){
        showText2=true
    }
}
So that the text gets displayed when the player clicks on the Npc with the left mouse button,
instead of when the player collides with it, or when the player presses the space bar?
Could somebody maybe help me with doing that?
I hope it's alrigth to ask this.
 
Is it possible for me to change this part,
-snip-

So that the text gets displayed when the player clicks on the Npc with the left mouse button,
instead of when the player collides with it, or when the player presses the space bar?
Could somebody maybe help me with doing that?
I hope it's alrigth to ask this.
It should be fairly easy to change the functionality of that!
Here is how I would approach it:
Code:
///CollisionWithPlayer

if showText2=true{
    if mouse_x>x-16 && mouse_y>y-16 && mouse_x<x+16 && mouse_y<y+16 && mouse_check_button_released(mb_left){
        showText=true
    }else{
        showText=false
    }
}else{
    showText=false
    if  mouse_x>x-16 && mouse_y>y-16 && mouse_x<x+16 && mouse_y<y+16  && mouse_check_button_released(mb_left){
        showText2=true
    }
}
 
Update version 1.263!
EXE(3MB)
Source(740kb)
Example(740kb)


Patch Notes:
Fix multiple bugs with saving + loading larger dialog trees (sorry about that!)
Cleaned up the "convo" interface to have a nicer look and fixed multiple bugs with it
Added syntax highlighting for Switch Nodes
Added the ability to set the default text effects you want applied to your dialog! Now you can have a certain character default to comic sans, or a different color
-Access this in the editor with Options->Change Defaults
You can now have labels(xxx) attached to switch statements. Here is an example of how you would do this:

It does not matter which check Node you attach the script to, just as long it is attached to one of them

Here is a list of things that you should change in your project in order to get them up to date:
Create event of parNPC
draw_text_bb_ext_black_centered
draw_text_bb_ext_centered
load_npcChat
draw_text_bb_ext_black_centered
draw_text_bb_ext_centered
added load_npcLabel
 
Last edited:
P

PopatoChisp

Guest
It should be fairly easy to change the functionality of that!
Here is how I would approach it:
Code:
///CollisionWithPlayer

if showText2=true{
    if mouse_x>x-16 && mouse_y>y-16 && mouse_x<x+16 && mouse_y<y+16 && mouse_check_button_released(mb_left){
        showText=true
    }else{
        showText=false
    }
}else{
    showText=false
    if  mouse_x>x-16 && mouse_y>y-16 && mouse_x<x+16 && mouse_y<y+16  && mouse_check_button_released(mb_left){
        showText2=true
    }
}
Thank you so much for replying I'm going to try this as fast as possible, thank you!
 
T

tagomago

Guest
Dear NoobsWeStand, I'm sure this has been addressed before, but I'd like to ask if this is compatible with Gamemaker Studio 2.
Kind regards

EDIT: I successfully imported EBDS in Gamemaker Studio 2, only firing up some compatibility issues which GMS managed to automatically convert. So, everything is working.
Just one note, I downloaded the Example file 2.63 but it just seems to be a duplicate of the Source file and not the actual Example. I was a bit confused with the fact that Source and Example files being identical until I downloaded the previous version of the Example file that is linked in the first post thread.
 
Last edited by a moderator:

mycelia

Member
Hey all, just thought I'd pop in and share something I made! It's probably obvious to y'all who are good at coding, but for anyone else who struggles -- it's a script you can use to change the talksprite for the NPC. It seems to work, but I haven't done extensive testing yet. I'm gonna try to do one for the name as well. Just plug in the name of the sprite you want to change it to.

Code:
///For changing dialogue sprites mid-convo
//scr_changeSprite(sprite)

newSprite = asset_get_index(argument0);

dialougeSprite = newSprite;
 
T

tagomago

Guest
Hi,
Is it possible to get the string_height excluding the scripts and bbcode? I wanted to make the dialogue box vary according to the number of lines being drawn, but even for a short sentence, if the string_height includes the bbcode and script codes, it can appear like 8 lines instead of 1. How can it be done?
Kind regards
 
P

PopatoChisp

Guest
It should be fairly easy to change the functionality of that!
Here is how I would approach it:
Code:
///CollisionWithPlayer

if showText2=true{
    if mouse_x>x-16 && mouse_y>y-16 && mouse_x<x+16 && mouse_y<y+16 && mouse_check_button_released(mb_left){
        showText=true
    }else{
        showText=false
    }
}else{
    showText=false
    if  mouse_x>x-16 && mouse_y>y-16 && mouse_x<x+16 && mouse_y<y+16  && mouse_check_button_released(mb_left){
        showText2=true
    }
}
Hi again,

Sorrry to bother you again, but would it be possible to change it somehow so that the text only appears when
the player clicks on a certain object, no matter where that object is on the screen?
For example if I move the npc to a different part of the screen or add another npc somewhere on the screen.
 
T

tagomago

Guest
Hi again,

Sorrry to bother you again, but would it be possible to change it somehow so that the text only appears when
the player clicks on a certain object, no matter where that object is on the screen?
For example if I move the npc to a different part of the screen or add another npc somewhere on the screen.
The code that @NoobsWeStand suggested should do exactly what you want. Have you tried it?
 
P

PopatoChisp

Guest
The code that @NoobsWeStand suggested should do exactly what you want. Have you tried it?
Yep I tried, but maybe I did something wrong. I'm trying to check everything at the moment.

EDIT: Ok it's working, but the text box only appears for a sec after clicking and then it's gone again. And it doesn't work when I change the sprite of the npc, only when I click diretly where the origin of the sprite is. Could you maybe help me fix this problems?

Edit2: It works now completly sorry for the trouble.
 
Last edited by a moderator:
P

PopatoChisp

Guest
Is it possible to change the name displayed while the conversation ? So two or more characters can "talk" to each other, for example the first text is "Steve" and the second is "Tony"

Oh and I have a script rigth now that says
Code:
Adrian.sprite_index = Adrian_wakeup
and I named the script Wakey and used a script node
Code:
[text]
text[0,0]=hallo|Wakey|
text[1,0]=wassup dude
[config]
[vars]
vars=
[default]
default=1:746578745370656564:3FF0,1:74657874485356:,1:74657874576176654F:,3:74657874436F6C6F72:7768697465,1:74657874416C706861:3FF0,1:746578745368616B65:,1:746578745761766546:,1:746578745368616B6559:,1:746578745368616B6558:,3:74657874466F6E74:666E745F64656661756C74,1:746578745761766541:
but I think I have may have done it wrong, because the script isn't beeing executed.

Could you maybe help me again, if it's not to much trouble?
 
Last edited by a moderator:
Is it possible to change the name displayed while the conversation ? So two or more characters can "talk" to each other, for example the first text is "Steve" and the second is "Tony"

Oh and I have a script rigth now that says
Code:
Adrian.sprite_index = Adrian_wakeup
and I named the script Wakey and used a script node
Code:
[text]
text[0,0]=hallo|Wakey|
text[1,0]=wassup dude
[config]
[vars]
vars=
[default]
default=1:746578745370656564:3FF0,1:74657874485356:,1:74657874576176654F:,3:74657874436F6C6F72:7768697465,1:74657874416C706861:3FF0,1:746578745368616B65:,1:746578745761766546:,1:746578745368616B6559:,1:746578745368616B6558:,3:74657874466F6E74:666E745F64656661756C74,1:746578745761766541:
but I think I have may have done it wrong, because the script isn't beeing executed.

Could you maybe help me again, if it's not to much trouble?

You simply forgot to put the parenthesis at the end of the script. So it should look like Wakey()


Is this system still in development?
This is still being worked on.
I have been busy with school, but I am hoping to release a new version of this soon that will address some issues
 

The-any-Key

Member
This is still being worked on.
Ok. Thats good. I have been working with the example project and changed stuff to make it more "extension-like". Its simple to setup the dialog window and you can simply add the extension in your game and integrate it in no time. Can I put it here so you can have a look at it and if you like it you can replace the example you got. I will do a video on how to use it and the changes if anyone is interested.
 

The-any-Key

Member
This is the upgrade of the example project. I have also changed some of the variable names (added dialogue_ in front of most of them) so they wont interfere with the NPC from your own game. Also organised the scripts and objects a little.

the thing that is not working is when the text alignment when BB code is used. BB code is always centered. I tried to create scr_dialouge_draw_text_bb_ext_left and scr_dialouge_draw_text_bb_ext_right but no luck :)

Download: https://drive.google.com/open?id=0BxE4k4xEiNO2U2k1VUUwb2UtWjg
ENABLE SUBTITLE.
 
T

Toreno

Guest
Hello. Can I use this for commercial purposes? If so, how should I give credit?
 
This is the upgrade of the example project. I have also changed some of the variable names (added dialogue_ in front of most of them) so they wont interfere with the NPC from your own game. Also organised the scripts and objects a little.

the thing that is not working is when the text alignment when BB code is used. BB code is always centered. I tried to create scr_dialouge_draw_text_bb_ext_left and scr_dialouge_draw_text_bb_ext_right but no luck :)

Download: https://drive.google.com/open?id=0BxE4k4xEiNO2U2k1VUUwb2UtWjg
ENABLE SUBTITLE.
This is great! I love it :)
I haven't taken a deeper look at it, but from the surface everything looks good

Hello. Can I use this for commercial purposes? If so, how should I give credit?
You can use it for commercial purposes. You do not need to give credtis
 
S

santiagolemos123

Guest
Thanks. You can use it as an additional example if you want. I will add some more features to it later like a scale 9 system for for the boxes so it can handle sprites as backgrounds.
this is not running in Android :(
 
S

soho

Guest
hey, thanks for making my life a lot easier with your system.
I still have a question, tho. I am taking the example file apart and trying to figure out where everything belongs. Where does the program take the text for the start dialogue from??
I thought it comes from here:
//loadNPCChat
file=file_text_open_read(global.NPCdirectory+"\"+string(argument[0])+".txt")

but i am wondering where would i find .NPCdirectory?

thanks :)
 
L

Lykourgos

Guest
Great little tool, I really like the handy app you made, too, to help with the dialogue construction. I can get your example working by itself in GMS2 without difficulty, but have so far been banging my head against the table trying to transfer your tool over into my own project.

EDIT:

Solved it myself. It was literally because I failed to place the dialogue room at the beginning, before the actual game-room. I hate myself sometimes.

EDIT2:

I'm now at the point where I have got the game to load up without issue, and when I walk over the character the dialogue box appears. However, there's no text; the game has this error in the output:

EDIT3:

Yep, definitely want to hate myself. Just needed to put it in a directory named "dialog" (what happened to the "ue" at the end there?)



It works now. It's so beautiful. :')
 
Last edited by a moderator:
S

santiagolemos123

Guest
I have not tested my example on android.

Have you tested the original example?
Yes, original example. Dont show some dialog text. I think it's because of the animation, because the other texts appear. How could you verify this? thxxx
 
Q

Quailfail

Guest
I'd like to credit you, NoobsWeStand. Would you like me to use your name on this forum or something else?
 
T

Thiker

Guest
Yep I tried, but maybe I did something wrong. I'm trying to check everything at the moment.

EDIT: Ok it's working, but the text box only appears for a sec after clicking and then it's gone again. And it doesn't work when I change the sprite of the npc, only when I click diretly where the origin of the sprite is. Could you maybe help me fix this problems?

Edit2: It works now completly sorry for the trouble.
Hey i am also trying to make the dialogue open on click and are running into the same problem.
The text box appears but then dissapears after a sec. Would you mind telling me how you fixed this?
thanks in advance :)
 
L

Lykourgos

Guest
Does anyone else experience an issue wherein you can't send arguments to a script?

For example, if I write "scr_runthisscript(1)" in the script box, then I make a script with that name that says "effect = argument0", it doesn't work. Effect does not get that "1" value.

Because of this issue I have to pile scripts on top of each other. For example I have a script change a global to 1, and then I have a second script to see if that global is 1.

Oddly enough, there's no problem returning a value.

I freely admit to sucking at GML, so if I'm doing something wrong feel free to point and laugh (and then tell me how to fix it, please).
 
Last edited by a moderator:

mycelia

Member
Does anyone else experience an issue wherein you can't send arguments to a script?

For example, if I write "scr_runthisscript(1)" in the script box, then I make a script with that name that says "effect = argument0", it doesn't work. Effect does not get that "1" value.

Because of this issue I have to pile scripts on top of each other. For example I have a script change a global to 1, and then I have a second script to see if that global is 1.

Oddly enough, there's no problem returning a value.

I freely admit to sucking at GML, so if I'm doing something wrong feel free to point and laugh (and then tell me how to fix it, please).
Sorry for the late reply! You might've fixed it by now, and I kinda suck at GML too so I could be totally off base, but at a guess I'd say something's not passing/reading correctly. I think the engine passes arguments as strings by default, so something like "effect = real(argument0);" might do it.

edit: And also!! While I'm here, I tweaked my sprite change script so you can set both sprite and frame, because my game will have multiple expressions per character that don't need to have talking animations so I'm putting all the expressions in the subimages of one sprite. If your game has talking animations, this won't work, but the old one will.

Code:
///For changing dialogue sprites mid-convo
//scr_changeSprite(sprite,frame)
//dialougeSpriteFrame needs to be added in the Create event of par_npc as well as the child (at the same time as name, PID etc.) 

newSprite = asset_get_index(argument[0]);
newSpriteFrame = real(argument[1]);

dialougeSprite = newSprite;
dialougeSpriteFrame = newSpriteFrame;
 
Last edited:
L

Lykourgos

Guest
Sorry for the late reply! You might've fixed it by now, and I kinda suck at GML too so I could be totally off base, but at a guess I'd say something's not passing/reading correctly. I think the engine passes arguments as strings by default, so something like "effect = real(argument0);" might do it.

edit: And also!! While I'm here, I tweaked my sprite change script so you can set both sprite and frame, because my game will have multiple expressions per character that don't need to have talking animations so I'm putting all the expressions in the subimages of one sprite. If your game has talking animations, this won't work, but the old one will.

Code:
///For changing dialogue sprites mid-convo
//scr_changeSprite(sprite,frame)
//dialougeSpriteFrame needs to be added in the Create event of par_npc as well as the child (at the same time as name, PID etc.)

newSprite = asset_get_index(argument[0]);
newSpriteFrame = real(argument[1]);

dialougeSprite = newSprite;
dialougeSpriteFrame = newSpriteFrame;
I didn't fix it; apparently I'm a big fan of being laborious and brute-forcing my way through problems. My solution was to run two scripts instead of one. Basically, I'd have a script to change a variable to a certain amount, and then a second script would draw the number from that variable for use in whatever process I was trying to accomplish.

Anyway, your solution is obviously a thousand times better, so I'm going to test it and then use it if I can get it to work. It would only work with one argument per script, right? At any rate, thanks!



My current challenge is getting the mouse cursor to go over the dialogue box. I have a game room, and then the dialogue room. If I place the cursor only in the game room, even drawing as a GUI, it will appear under the dialogue box. If I place the cursor in the dialogue room, it will appear over the dialogue box, but the mouse cursor won't leave the dimensions of the dialogue room (I have a large map, if the character walks 3000 pixels to the East, the mouse will not go that far.

Kind of at a loss at this point, maybe I'll just accept it.
 
K

KitKatKatu

Guest
the thing that is not working is when the text alignment when BB code is used. BB code is always centered. I tried to create scr_dialouge_draw_text_bb_ext_left and scr_dialouge_draw_text_bb_ext_right but no luck :)
I've been having the same problem. Have you or others found a way to get BB code to start on the left?
 

Hermit

Member
I've been having the same problem. Have you or others found a way to get BB code to start on the left?
The reason this doesn't automatically happen is because the string is output one character at a time. To make it left aligned you have to modify the starting position. In scr_dialogue_draw_text_bb_ext (I think this used to contain "_centered") I changed the _x variable to 0 if text align is fa_left. (ds_l[|__i]/2)*-1 is the bit that centers it.
 
K

KitKatKatu

Guest
The reason this doesn't automatically happen is because the string is output one character at a time. To make it left aligned you have to modify the starting position. In scr_dialogue_draw_text_bb_ext (I think this used to contain "_centered") I changed the _x variable to 0 if text align is fa_left. (ds_l[|__i]/2)*-1 is the bit that centers it.
Is this the part that you were talking about?

//Reset and set _x to half of first line's width (for centered)
var __i=0;
if ds_list_size(ds_l)>0{
_x=(ds_l[|__i]/2)*-1 _y=0
}else{
_x=0 _y=0
}

Even when I change _x to 0, if won't go to the left.
 
Last edited by a moderator:

Hermit

Member
I have a heavily customized version at this point so I had to download the old one to check it out. Here's what to do using The-any-Key's version. The portion you quoted, change it to:

Code:
if ds_list_size(ds_l)>0 && objDialogueControl.Dialogue_box_text_align_text = fa_center {
    _x=(ds_l[|__i]/2)*-1 _y=0
}else {
    _x=0 _y=0
}
Then search for //Check for new lines. Replace with the following:

Code:
        //Check for new lines
        if string_pos(" ",_str)=0{
            if _x+string_width(_s)>(argument[4]) {
                 __i++
                  _x=(ds_l[|__i]/2)*-1
                _y+=argument[3]
            }
        }
      
        if objDialogueControl.Dialogue_box_text_align_text = fa_center {
            if _x+string_width(string_copy(_str,1,string_pos(" ",_str)+1))>argument[4]/2{
                 __i++
                 _x=(ds_l[|__i]/2)*-1
                _y+=argument[3]
                
            }
        } else if objDialogueControl.Dialogue_box_text_align_text = fa_left {
            if _x+string_width(string_copy(_str,1,string_pos(" ",_str)+1))>argument[4]{
                 __i++
                 _x=0
                _y+=argument[3]
                
            }
        }
        if _s=="#" || _s==chr(13){
            __i++
             if objDialogueControl.Dialogue_box_text_align_text = fa_center { _x=(ds_l[|__i]/2)*-1 } else { _x= 0 }
            _y+=argument[3]
        
        }
Now it's all left aligned but still starting from the center of the box. So in parDialogueNPC's Draw GUI event, find // Set align. Add a switch case for fa_left:

Code:
case fa_left:
tx_center=tx
break;
You'll have to do the same modifications for the black script's positioning if you want the outline. Hope this helps. I never bothered with fa_right but I imagine it would be easy to add by subtracting the difference of the line width from the box width and making that the starting point.

(edit) Oh I want to thank the OP very much for making this! I've reworked it for a visual novel and it's been great so far. I especially appreciate that you gave us the source; it's useful to add identifying information to textboxes like who's speaking or space limitation warnings since my in game boxes don't scroll. This is the next best thing to an actual scripting language.
 
Last edited:
K

KitKatKatu

Guest
Now it's all left aligned but still starting from the center of the box. So in parDialogueNPC's Draw GUI event, find // Set align. Add a switch case for fa_left:

Code:
case fa_left:
tx_center=tx
break;
Thank you so much!! I was able to get it working with your tips. For anyone with the same problem, I had a hard time getting it to work for a while because I didn't realize there were many // Set aligns, so keep scrolling to replace them all!

My game also has lots of dialogue, so even though it's a steep learning curve for me, it'll be really great in the long run! Thank you so much to OP for working on this project <3 and to everyone who has been contributing along the way.
 

The-any-Key

Member
I wanted to add this in my example but I just get:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object parDialogueNPC:

undefined value
at gml_Script_scr_dialouge_draw_text_bb_ext_black_centered (line 235) - __i++ _x=(ds_l[|__i]/2)*-1
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_scr_dialouge_draw_text_bb_ext_black_centered (line 235)
called from - gml_Object_parDialogueNPC_DrawGUI_1 (line 140) - scr_dialouge_draw_text_bb_ext_black_centered(tx_center+objDialogueControl.Dialogue_box_text_shadow_x,ty+objDialogueControl.Dialogue_box_text_shadow_y,_str,objDialogueControl.Dialogue_box_text_sep,tw)

Can you post scr_dialouge_draw_text_bb_ext_black_centered and scr_dialouge_draw_text_bb_ext_centered
 
V

Valen

Guest
If i use this, can i also add images to the dialogues but outside of the dialogue box?
or just inside of it? Example: Character Portrait during the dialogue
 
B

BadSprite

Guest
Hiya guys! I was wondering how to get the text to be left aligned in NoobsWeStand's most recent example file. I know this is a question that was answered and fixed in The-any-Key's example, but I'm very far into development in my game to make the switch now. Thank you for understanding!
 
K

KitKatKatu

Guest
Back again haha
I've been trying to figure out how to stop words from being half written before being bumped to the next line. I noticed the code:
Code:
        if string_copy(str,dialogueTextOn-1,1)=="["
        {
            while(string_copy(str,dialogueTextOn-1,1)!="]"
                && !(dialogueTextOn>string_length(str)))
                {
                dialogueTextOn++
                }
So I've been trying to brainstorm how to make it so that when it draws a letter to make it look for a space to know whether to start writing the word, but I'm sadly missing the mark. What I've got:
Code:
                if string_copy(str,dialogueTextOn-1,1)!=" "
                {
                    while(string_copy(str,dialogueTextOn-1,1)!=" "
                        && !(dialogueTextOn>string_length(str)))
                        {
                        dialogueTextOn++
                        }
                }
How would I write this properly??

My second problem is: even though in the example file the text lines in game appear as they should, in my game when the text wraps the first line moves upwards, as if the text block is being centered on the text starting point. I've copied and pasted the code into my game exactly as is, so I can't figure out what could be causing it to rewrite the y starting points for the text. I don't expect anyone to be able to guess what's wrong since it does work as intended in the example file, but thought I'd throw that out there in case people have suggestions for where in the code I should be looking to fix that. I'll keep looking as well!
Here's an example of what I'm talking about:
text ex 3.png text ex 2.png
Thanks so much in advance!
 
Top