Branching Dialog System with Effects in GMS 2! (Part 5: Colored Text, Wavy Text, Other Text Effects)

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • Welcome to the final part of this series! Good luck!
    Support me and these videos on Patreon! / peytonburnham
    My tweets: / peydinburnham
    My Game: peytonburnham....
    Discord: / discord
    My twitch: / peydinburnham

Комментарии • 209

  • @tadeo5318
    @tadeo5318 3 года назад +51

    Hey mate , Im currently in my first semester of college and I had to make a game in 2 weeks and ive watched pretty much every tutorial you got, everytime i come back i see more subs and with good reason. You have no idea how great these tutorials are. Thank You!

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +8

      that's awesome! Glad I could help you out, and thank you!

  • @DJaycerOfficial
    @DJaycerOfficial 10 месяцев назад

    This is a great tutorial! Though in all of my testing there seems to be a delay between the input of the keyboard and the drawing of the text box, which causes the text to seem to draw immediately since the instance of the textbox exists before everything is drawn, causing drawchar to already count up. Just a fair warning to you, and to anyone else that is confused by this. A possible solution is to only draw the text after a variable is set to true during the “draw the textbox” event. I haven’t tested it yet but I’ll see if it works.
    Edit:
    The solution to this problem if anyone wants it is to set accept_key to false in the setup event. It has nothing to do with the fact that the text is being drawn before hand as I have suspected. It is rather because we use the same variable for completely filling out the page as for initiating dialogue. (If you’re doing it this way).
    Most games do have the interact and accept key as the same button though and most of the time it won’t be the mouse button and space bar to interact with things so I hope this helps anyone who is using just one variable. And sorry for doubting your code Peyton.

  • @ShadowbaneOverload
    @ShadowbaneOverload Год назад +1

    Might figure it out myself before I get a response but hey.
    How does one stop a line of dialogue from showing up again within the same case?
    Or how do you make it switch to a new case without the dialogue immediately switching to that text, if not possible to do it in the same case?
    That is to say, if you interacted with the same person or object more than once, it should say something different rather than cycling through all the messages.
    Example:
    1st inspection -> 'I looked through the cupboard, but there were only pots and pans.'
    2nd -> 'Nothing I can use.'
    I got all the other textbox things working thanks to these tutorials, but this is one thing that's bugging me as I make my game.
    I feel like the answer is variables, and of course I've been messing with them.

    • @ShadowbaneOverload
      @ShadowbaneOverload Год назад +1

      Global variables made it work, but I pray there is an easier method because it's a royal pain in the ass keeping track of literally everything and it can't be good for memory storing that many global variables at once.
      Using my example, this is how it was done. (I used a script solely to store global variables. global.cupboard was set to 0 by default.)
      case "Cupboard":
      if global.cupboard = 0
      {
      scr_text("I looked through the cupboard, but there were only pots and pans.", "Guy");
      global.cupboard++;
      } else {
      scr_text("Nothing I can use.", "Guy")}
      break;

  • @indiepunch3443
    @indiepunch3443 3 года назад +2

    Awesome stuff.

  • @mismatchingshoes5249
    @mismatchingshoes5249 2 месяца назад

    good tutorials

  • @hamishpawelski9851
    @hamishpawelski9851 2 года назад

    i cant get any effects to work. I have had no issues with anything else, and I've double checked the code but there still could be something I've missed. when I try to use an effect nothing happens, there is no error, it just runs like nothing has been changes completely normally. The only difference I can think of is my font is different and my colour is black instead of white. Can anyone help?

  • @digitalswordplay
    @digitalswordplay 2 года назад +37

    Peyton, I just wanted to say that I've finally finished this tutorial series! - It was honestly well done and even better than some of the other well known gamemaker tutorial makers on youtube. This mini course has been instrumental for me in learning how to use for loops and arrays properly. Now onto the inventory tutorial. My aim will be to at the end to combine the two mechanics, so that when you talk to an NPC the NPC will give you an item to add to your inventory. Cheers.

  • @jessejayjones
    @jessejayjones 3 года назад +21

    Wanted to say again, that this was a brilliant tutorial for such an involved subject. I had the notion that making a visual novel would be easy. HA HA! I learned so much about programming in general by following this as well and have a lot of new tools and concepts. Thanks again for taking the time, just finished this and it's working great! 😄

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +8

      Thats awesome to hear! And thank you! Good luck with your projects!

    • @Despedite
      @Despedite 3 года назад +3

      It's sorta-kinda-easy in the sense that once you have the dialog system, that's half of the programming done (save for any extra stuff you might want to add in) and the rest is writing and art. But it definitely isn't a walk in the park!

  • @asdf-hj9dy
    @asdf-hj9dy 2 года назад +18

    Hi Peyton! Could you perhaps make a part 6 to this tutorial series? I would love to see how you pass through certain scripts at different text pages. For instance, creating an instance after reaching a certain text page.

    • @Dorpato111
      @Dorpato111 8 месяцев назад +1

      A little bit too late but, did you ever find the solution?

  • @spiwit.mp4
    @spiwit.mp4 3 года назад +17

    One of the best series I've seen on youtube! Also could you make a tutorial on implementing Z axis in gamemaker for example when you walk up stairs?

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +6

      Thank you! And I'm not totally sure that I'm going to cover something like that. It can get pretty complicated and it adds a whole bunch of new things to consider that can be difficult to compensate for. But you never know!

  • @Chlebcio_gaming
    @Chlebcio_gaming 4 месяца назад +2

    But how to do something like if you Press a button while looking at a chracter so the dialog starts?

  • @Jaies_
    @Jaies_ 2 года назад +7

    Amazing!!! I would love to see a tutorial on how to do cutscenes, such as characters moving around screen, then talking, having events occur throughout a scene, camera moves, etc. :))

    • @_bubblezzzzzz_
      @_bubblezzzzzz_ Год назад +1

      Would be interesting to see how he would do it. If interested FriendlyCosmonaut did a cutscene series that I am using along with this textbox tutorial. ruclips.net/p/PLSFMekK0JFgyenUYJrejhK21SOhf4RSCb

    • @akioseiei6296
      @akioseiei6296 Год назад

      @@_bubblezzzzzz_ Hey I tried the first video but i enconter a problem, it says that scene++; is not recognized do you know how to fix that problem ?

  • @HJ-pd2zj
    @HJ-pd2zj 3 года назад +6

    this was a really nice tutorial! while i knew entering this that this would be rather advanced, the end product was very easy to edit and/or introduce new features into. i had figured out how to make it so that with the exceptions of ellipses followed by an empty space, punctuation symbols next to eachother (like !?, !!!, or ...?) basically count as one whole symbol and are all drawn first before the pause happens, how to make it so that ellipses at the start of a sentence do not pause, how to decide for each page if the text is nonskippable and if it requires no input from the player, how to make it so i can write manual pauses and even the ability to pause in the middle until the interact key is pressed into the text itself using special symbols much like rpgmaker if anyone is acquainted with it, and so much more, so this is better than anything than i could've ever hoped for!
    there is one thing i would like to know though, and it's about an error that occurred to me a few days ago. for context, i have a 3-paged textID set where the second and third pages are all shaky but the first page is not, although whether the first page is shaky or not doesn't really matter because i have tested it already.
    basically, when i write shakeTimer[j, page]--; (i use camelcase and letters i and so on for for loop locals) an error would happen when the text is in the middle of writing saying [1] out of range [0] or [2] out of range [0] depending on the page where it happens. it's also not something that happens consistently, and i haven't randomized the seed at all. sometimes it immediately throws an error the first time the second page is being written, sometimes the whole 3 pages can be written without any issues twice before trying to draw the third page for the third time does the error finally appear.
    i have no clue what causes this, because colored text and wavy text both work fine, i have not edited the way that shaky text works at all nor do my own new features change any code that have anything to do with the per-letter visual variables, and the error only also occurs on this line because i have tried commenting it out and the error didn't happen when i did so. the debugger also doesn't help because shakeTimer[j, 1] and shakeTimer[j, 2] watches do return actual integers that follow irandom_range(4, 8) instead of returning , pageNumber is very much what it should be, and i have made sure that shakeTimer was declared correctly in set_text_defaults.
    what confuses me the most though, is when i had changed shakeTimer[j, page]--; to shakeTimer[j, page] -= 1;, everything just started working like it should, and no errors have occurred since.
    i'm asking, because i want to know what is the reason for this error, in case i run into it again in the future. the code (that uses --) seemed to have been working properly a day before this incident happened, and i don't quite think it's an ide bug either since a bug arounding something as simple as subtracting 1 seems highly unlikely to have escaped bug testing. sorry for the bother and how long this comment is, by the way!

    • @deymitsjeym
      @deymitsjeym 2 года назад +1

      Have you also faced an issue where skipping the shaky/wavy text too fast causes an error?

  • @0TastyPie0
    @0TastyPie0 2 года назад +6

    This tutorial series was very helpful, and very open for creative changes!
    I didn't like how you had to manually input character positions for when to make a text effect change (start coloring with blue here etc). Instead I made a system which looks for special "marker characters" within the dialogue themselves, and changes how to draw from there automatically! I wouldn't have been able to make that without this series, so thanks a lot!

  • @CalbDoesStuff
    @CalbDoesStuff 2 месяца назад +1

    hey mate, real quick question. How would I make it now change so that if I press a keyboard button while my character is facing/touching the object, the dialogue comes up?

  • @Axogamerlover
    @Axogamerlover 6 месяцев назад +2

    WAIT ARE YOU GOING TO MAKE AN NPC TUTORIAL I NEED THIS PLSSSS!!!!!

  • @MrValandas
    @MrValandas 2 года назад +6

    Just got through this. One of the best tutorials out there, even better than some of the ones I paid for on Udemy. You're very generous doing this for free and I would gladly pay for this.

  • @k1ng.Gaming
    @k1ng.Gaming 2 года назад +4

    hello! nice tutorial! but there is one problem... if i move my character while im in the conversation. the text box will move to, but the text stays on the same position. How can i fix that?

    • @TheLegendarySandwich
      @TheLegendarySandwich 2 года назад +2

      you need to make a state machine, with a lock. i thing shaun spalding made a toutorial about state machines

  • @afonsosousa4960
    @afonsosousa4960 3 года назад +3

    You could do a tutorial on how to do a melee attack in an rpg at the game maker studio (if my english is bad it's because i'm using the translator)

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +4

      That's a good suggestion! That might be what I do next!

  • @deepseatrip
    @deepseatrip Год назад +2

    I have gone through all of Peyton's tutorials and Shaun Spalding's RPG tutorial. I am using this dialogue system with Shaun Spalding RPG tutorial as the core.
    I could not figure out for the awhile how to get the states working with this dialogue system. Mainly freezing the character correctly as you go through the pages and responses. Responses was usually where the player would enter free state again, with the things i was trying and failing.
    BUT I finally got it!! (I have yet to encounter a bug after a hour of testing lol and not sure if this is a bad way of doing it and if this will have any other effect thats not good but it works.
    (my variable/naming conventions will differ)
    In the PlayerObject's step event I added this:
    if instance_exists(newTextBoxObject){
    with(playerObject){
    if (state != PlayerStateLocked){
    lastState = state;
    state = PlayerStateLocked;

    }
    }
    }
    And in the TextBoxObject (i called it newTextBoxObject) :
    I created a Destroy event and added:
    with (playerObject) state = lastState;
    And it worked!

  • @henkkk450
    @henkkk450 2 года назад +2

    Damn, this tutorials were soooo good.
    Btw is there a way to change the interaction with the speakbox?
    For example when you are colliding with it and you press enter the textbox appears.

  • @M00nH34rt
    @M00nH34rt 2 года назад +3

    I think there is an issue with "shake_timer[c, page]--"
    Could it be affecting the array somehow, instead of just the "shake_timer"?

    • @CopyCopyOriginal
      @CopyCopyOriginal 2 года назад

      yeah, it crashes occasionally, still trying to figure that one out

    • @_bubblezzzzzz_
      @_bubblezzzzzz_ 2 года назад

      @@CopyCopyOriginal came here to look for a solution, periodically getting an error.

    • @_bubblezzzzzz_
      @_bubblezzzzzz_ Год назад

      recently came back to this video and found my old comment.
      I fixed it by doing this: shake_timer[c, page] -= 1;
      I understand it is the same thing but also noticed the error in other code when I use the double dash for -1. I just change it to -= -1 and it no longer gives the error.

  • @iiihokori8626
    @iiihokori8626 Год назад +2

    Thanks! That really helps a lot!
    I just making my own dialog system according to your idea in these videos! It works perfect!
    And I have some related question: is there any way to make a script execute in specific dialog page?
    For example, I need a sprite of an other object be changed when the page==2. I tried to store the script into an array which is similar to the way of doing with text and people pic. But the script in the page just be executed as soon as I triggered the dialog of the object(when page==0 I guess?), which is not what I want (when page==2).
    Could you give some tips or suggestions for this? Thanks very much again. ;DDD

    • @TheLegendarySandwich
      @TheLegendarySandwich Год назад

      Yeah I want the same but also having problems...

    • @iiihokori8626
      @iiihokori8626 Год назад +1

      @@TheLegendarySandwich after several times of trying I found maybe setting the script execution in a separate branch (just as well as a branching dialog but with only script) would solve this problem... Hope it still help anyway ;D

    • @TheLegendarySandwich
      @TheLegendarySandwich Год назад +1

      @@iiihokori8626 yeah I also thought about that but didn't like it so I managed to set up that in a custom page it creates and object that will do what I want it to do

    • @iiihokori8626
      @iiihokori8626 Год назад +1

      @@TheLegendarySandwich oops perhaps due to other events and code influences so the effect vary depending on the situation. Also thanks for providing a new idea of solution! hope your development go smoothly :D

    • @TheLegendarySandwich
      @TheLegendarySandwich Год назад

      @@iiihokori8626 thanks!

  • @Abdulrahman_tramsy
    @Abdulrahman_tramsy 3 года назад +4

    I was waiting for those tutorials about textboxes and dialogue also thanks so much for the new cool text effects

  • @PickledPotato
    @PickledPotato 2 года назад +3

    Great tutorial series! I got it working and changed some things for my game. unfortunately i must've messed up and now the typing effect of the first line doesn't work anymore. only on page 2 of the textboxes the sound and typing works again.
    edit: as always, shortly after posting I found the problem myself. maybe it helps someone:
    i had edited the speakblock so it would create the textbox only if the player hits the accept key. this resulted in the first line of dialog being skipped automatically.
    fixed it by including keyboard_clear(vk_space);
    before create_textbox(text_id);

    • @zachariahlima1693
      @zachariahlima1693 2 года назад +1

      you are an absolute lifesaver... thanks for the help!

    • @migalex8901
      @migalex8901 2 года назад +1

      You will probably never see this but I love you man! You solved a problem that I had for over half a year. Thank you so much!!

  • @CalJorvik
    @CalJorvik 10 месяцев назад +1

    I've got a problem right off the bat with colouring the characters! Instead of the corner of each character being coloured corrected by the scr_text_color function, each of the four colour values act differently.
    _col1 affects the the top left of the first few characters, _col2 affects the top right of the final character, _col3 bottom right final character, _col4 bottom left final character.
    In fact, if I set the first and last character as the same, say (61, 61, c_blue, c_blue, c_blue, c_blue). The character still has patches of white and the preceding character is also coloured blue!
    Any ideas would be appreciated!

    • @tropicanz
      @tropicanz Месяц назад

      i had the same problem, did you ever find a fix?

  • @StompaJay
    @StompaJay 3 года назад +4

    These tutorials are amazing man, i gotta ask, is there gonna be any type of turn based combat tutorial? Itd be a huge help for the game im working on with these amazing tutorials

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +4

      Thank you so much! As of right now, I'm not planning on doing a turn-based series since they're actually pretty complicated and very nuanced. I never say never, but if I ever do decide on it, it'll be a while!

    • @StompaJay
      @StompaJay 3 года назад +3

      @@peytonburnham4316 that sounds good :D thank you for letting me know, i'll have to find a way to do something with what ive got so far. Thanks

  • @thegoatishere5131
    @thegoatishere5131 2 года назад +2

    Obviously this was an incredibly swag and helpful tutorial, and I couldn't be more grateful, but could anyone tell me if its possible to have an event or something akin fire when talking to someone or selecting a specific dialogue choice?

  • @nightsout.
    @nightsout. 3 года назад +3

    Great series! I made it through with no issues. My only question is: wouldn't you want to put all the logic (the if statements, loops, etc.) in the step event and leave the draw code in the draw event? I've always heard that you should avoid putting a bunch of logic in the draw event because it is a very expensive event. Or is what we made here lightweight enough so that it won't matter?

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +2

      Thanks! And yes anything that you can bring into the step event you probably should. It’s been a while so i can’t totally recall which stuff i put in the draw intentionally for some specific reason. I think one of the loops i did in the draw because im pretty sure using draw_set_font() was important for getting the text sizes (especially if you want to add in different font data for each character). But honestly theres probably a toooon of optimization to be made here, so feel free to try out whatever you want!

  • @SmashAdams
    @SmashAdams 2 года назад +2

    You can search for a specific word in a string to color using string_pos_ext (), instead of counting the _begin, and _end.
    You'll need to pass into scr_text_set_color() the word to find, and likely how many times that word appears in the string since string_pos_ext() stops looking after it finds the first instance of that given word

  • @shovelbug
    @shovelbug Год назад +1

    i made it all the way to the end! it works perfectly with the obj_speakblock but as soon as i try to have something else create the textbox, it messes everything up. i had the dialogue box slightly opaque, and having a different object made it lose that, the text runs a lot slower and the textboxes no longer destroy themselves so you can see all the old textboxes. no idea why when all i should have to do is run the same line of code to create the box. create_textbox(text_id)

  • @ori9679
    @ori9679 2 года назад +2

    Hey!!! Thank you so much for this tutorial, they’ve all been super helpful. Do you have any recommendations on how I would go about creating a battle system? I have an idea on what I want it to be and no idea how to code it 😅

  • @AlexGarcia-rb4zy
    @AlexGarcia-rb4zy 3 года назад +2

    Hey, this was an awesome series! Another cool tutorial to add to this would be flags. Like changing what different NPCs say based on circumstances. Looking forward to Rose of Starcross!

  • @BirdboysUmbrella
    @BirdboysUmbrella 2 года назад +2

    Hey, just wanted to pop by real quick and say that you're an excellent teacher! Honestly, I usually never learn much from tutorials but this series you've done here has helped me learn SO much. It's helped IMMENSLEY. I'm currently in the process of making my very first game and this helped SO much. Hope you continue this stuff in the future! Thanks again!! : D

  • @thumbsup5427
    @thumbsup5427 Год назад +1

    Thank you so much for the tutorials! Is there a way to optimize this system? I have a small game but I see massive fps drops whenever a textbox is created and all of those functions run.

  • @alwaysonward
    @alwaysonward 3 года назад +3

    Thanks Peyton for a great tutorial series, this is really gonna help finish off the dialogue system for the game I'm working on.
    I can tell a lot of time and effort went into this, keep up the great work!!

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +3

      Thanks!! I'll be done with Starcade soon so I'll be back to videos very soon!

  • @llaero306
    @llaero306 3 года назад +2

    Hey so i have a request, i've seen your tutorials and they really help but i still can't manage to make an inventory, do you have any tips on how to make one?

  • @sansypants45
    @sansypants45 7 месяцев назад +1

    fantastic tutorial, thank you for making this

  • @haise_mix
    @haise_mix 2 года назад +3

    Your so good at making tutorials, by any chance could you make a tutorial on some kind of combat system?

    • @peytonburnham4316
      @peytonburnham4316  2 года назад +4

      I definitely will at some point!

    • @haise_mix
      @haise_mix 2 года назад +2

      @@peytonburnham4316 awesome! I turned notifications on, also nice game trailer it looks very cool

    • @peytonburnham4316
      @peytonburnham4316  2 года назад +2

      Echo thankyou thankyou!

  • @lukazundel7835
    @lukazundel7835 Год назад +2

    THE MAN'S FREAKING UNDERRATED

  • @BritBox777
    @BritBox777 3 года назад +1

    These are some great tutorials, I hope you continue to make more. But Please- if I can ask one thing- please zoom in on the code box when you're using it. Those trying to watch with GM2 running (and no high def second monitor) have a real hard time seeing what's happening with 70% of the video just showing blank GM2 gui.

  • @nesciovir7750
    @nesciovir7750 6 месяцев назад +1

    incredible outstanding work! i followed the whole dialogue tutorial and i am very proud to say it worked splendidly! thank you very much game making extraordinaire, i look forward to any other content you may produce!

  • @l_gio4311
    @l_gio4311 11 дней назад

    how to increase the speed of a specific piece of text? Something like: characters from positions 12 - 24 are printed at speed 3, and the rest of the text at speed 1

  • @thelegendarymushroom80
    @thelegendarymushroom80 2 года назад +1

    [SOLVED]
    Hey, so um, I don't remember where this part was but, I've finished the whole tutorial series a while ago and I have this problem that the text won't go into the next line, instead it disappears if it's too long or sometimes glitches to the bottom of the text box.
    This is really annoying and I don't know how to change this :3 would be nice if someone would help me.
    Also I really want to see more of your tutorials, they are kinda addicting and iv'e already went trough them all :D
    Thanks for the advance!
    EDIT:
    so basically I found someone wrote this in the third part of the tutorial, took me a while to find it :D but thank you ! again!
    It because I missed a space in the draw event of the obj_textbox
    I wrote:
    (if char[c,p] == "" )
    but I should've wrote
    (if char[c,p] == " " )

  • @TheAngryLibrarian
    @TheAngryLibrarian Год назад +1

    Wow, wow, wow this was incredible! Every single step worked exactly as it did in your tutorial, and that is honestly a rare experience for me. Thank you SO much for creating this series!

  • @flamemix2320
    @flamemix2320 Год назад +1

    a lovely tutorial! however I have a question, how to make text pop up when you interact with an object?

  • @jrgamesbrx
    @jrgamesbrx 3 года назад +2

    You didnt won just +1 subscriber, you also won +1 copy for EVERY game you make, thanks a lot man

  • @toddqdev
    @toddqdev 4 месяца назад

    guys if this doesnt work for you don't type "[c, page_number]" instead try "[c][page_number]" because of arrays update

  • @memeslandofawesome
    @memeslandofawesome Год назад +1

    After the hours of learning and taking notes I though it would be criminal to leave without saying thank you! You've seriously helped me and alot of people! Thanks again!

  • @MarteenGreen
    @MarteenGreen Месяц назад

    Thanks for this tutorial series. You a real GML GOD, bro! Looking forward to ore tuts after your platformer one

  • @themineiverse5472
    @themineiverse5472 2 года назад +1

    You should try making a tutorial series on making a platformer (with physics similar to gimmick!)
    I would definitely watch it!
    Also good luck with rose of starcross!

  • @lloyd011721
    @lloyd011721 6 месяцев назад

    how do you make the text colors work for the options? when you put the scr_text_color under the options, it still only applies to the text before the options

  • @Livonade
    @Livonade 2 года назад +1

    Guys, we need to sub, like, and buy his game so that Peyton can enjoy eating and staying alive.

  • @AlfredPros
    @AlfredPros 2 месяца назад

    The "fun" part is when you want to center the text. You may need to add a new part of code to make it possible.

  • @hyoon1366
    @hyoon1366 Год назад +1

    even tho i have no idea what i am doing this guy just made it look easy thank u so much ;)

  • @lloyd011721
    @lloyd011721 6 месяцев назад

    so how do i make each text block have its own sprite without making a million textblock objects? its something in the creation code similar to how you did it with items right?

  • @erraww
    @erraww 3 года назад +2

    Is it possible to trigger text box when a player is colliding with an object, AND looking at it? 😅😅😅
    Thanks a lot!

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +1

      Yeah of course! I'm thinking of doing a small video on this. If you followed the "how to make an RPG" series, your character should have a "face" variable. Then in the "obj_speakblock" step event you can use the place_meeting function to check which side the player is on, and then check the players "face" variable and see if it's the correct direction.
      For example, in obj_speakblock step event:
      if place_meeting(x+1, y, obj_player) && obj_player.face == LEFT
      {
      create_textbox(text_id);
      }
      So you check if the player is to the right of the speakblock object, then you check and make sure the player is facing left! There are a couple more checks you should do as well. Like you should make sure a textbox doesn't already exists before you create a new one, you still need to check for a button to be pressed, and you should probably make the speakblock object the child of some kind of wall object.
      Hope that helped!

    • @erraww
      @erraww 3 года назад +1

      @@peytonburnham4316 I made this 😅
      (On Key press E event:)
      if !instance_exists(oPlayerFreezer) {
      if oPlayer.face = 0 && oPlayer.x < x - 9 && distance_to_point(x, oPlayer.y) < 1 or oPlayer.face = 1 && oPlayer.y > y +9 && distance_to_point(oPlayer.x,y) < 1 or oPlayer.face = 2 && oPlayer.x > x + 9 && distance_to_point(x, oPlayer.y) < 1 or oPlayer.face = 3 && oPlayer.y < y -9 && distance_to_point(oPlayer.x,y) < 1
      {
      //show_debug_message("true"); (just for test)
      create_Textbox(text_id);
      } else {
      //show_debug_message("false"); (just for test)
      }}
      So far is working
      😅😅

    • @peytonburnham4316
      @peytonburnham4316  3 года назад +1

      @@erraww Hey if it works, it works! Nice!

    • @erraww
      @erraww 3 года назад

      @@peytonburnham4316 Oh... I have another problem 😁😁😁😁
      I need to run code (in scrGameText) after dialogue is ended. But code starting before* character finishes talking 😅😅

    • @lloyd011721
      @lloyd011721 6 месяцев назад

      is there a way to do this that checks if the player is facing the npc dynamically? like in an rpg you character could talk to someone from any direction relative to where the npc is standing@@peytonburnham4316

  • @ThePoePoee
    @ThePoePoee 6 месяцев назад +1

    Is there a way to stop player movement when doing this and is it possible to make a video on how or just an explanation? Because I am having trouble with the player moving when trying to select the dialogue options and it also moves the text inside the main dialogue box

    • @deadatyourside
      @deadatyourside 6 месяцев назад

      me too im going to to tinker with it and let you know if i figure it out

    • @deadatyourside
      @deadatyourside 6 месяцев назад +1

      hey I found out how in the player step event say if instance_exists(obj_textbox) {xspeed = 0};

    • @ThePoePoee
      @ThePoePoee 6 месяцев назад

      @@deadatyourside im pretty new so im wondering if it matters where in my step page the code goes? i tried this and it made some weird grey filter over everything 😂 idk what i did but maybe its where the code was put

    • @ThePoePoee
      @ThePoePoee 6 месяцев назад

      @@deadatyourside nvm i put it elsewhere and it is working. you are a legend.
      Edit: I may have made a day/night system and that was the grey filter i was talking about.. i just totally forgot

  • @Noah-jk6ok
    @Noah-jk6ok Год назад +1

    This was an awesome tutorial series! Thank you thank you thank you, I've learned so so so much about Game maker as a whole and I feel confident enough to finally get going on my own RPG game! I have a question though! I've been trying to figure out a way and make a couple lines of code or so that let me calculate the obj_player's distance from the obj_speakblock and if they are close enough together then it will create_instance(text_box); but ive been having a little bit of trouble getting it just right.. If you know or if anyone in the replies know anything about this I would love the help, but thank you so much for this tutorial series
    [SOLVED!]
    After a long day of troubleshooting I finally got it! Everything works perfectly as intended now!

    • @lazydev69
      @lazydev69 Год назад

      how??? Ive been hours trying to do that vv'

  • @RedSW
    @RedSW 2 года назад +1

    Great series, like seriously please do more, but maybe a tiny bit slower lol.

  • @SmashAdams
    @SmashAdams 2 года назад +1

    Excellent Series! Excited to check out your other tutorial series/videos.

  • @MagerBlutooth
    @MagerBlutooth 2 года назад +1

    What's the distinction between naming variables with the leading underscore vs. naming them normal words?

    • @peytonburnham4316
      @peytonburnham4316  2 года назад +2

      A lot of people tend to use underscores for local variables, just to further differentiate them from regular variables!

  • @TheGrimGary
    @TheGrimGary 2 года назад +1

    Thank you for your tutorials! This text box system got me warmed up with coding again. Though I found that the it would be better for myself to parse out the text before hand and put escape codes in for coloring and effects. Of course...it makes it a little more complicated code-wise, but there is less thinking about text positions with effects and colors.

    • @peytonburnham4316
      @peytonburnham4316  2 года назад +2

      Oh glad to hear! And yeah my hopes would be these videos would just help get people on track, then figure out their own solutions for stuff so thats perfect!

    • @TheGrimGary
      @TheGrimGary 2 года назад +1

      @@peytonburnham4316 So good news. I finished the parser. Works well. And well, really only works with your base code. Makes things easy within the text itself rather than having to add functions to the conversation. I'm willing to share if wanted =)

    • @georgeloken
      @georgeloken 2 года назад

      @@TheGrimGary I would love to see what you have done it would simplify conversations immensely!

  • @kachooow
    @kachooow Год назад

    I wrote the code in order to make the word or words of a certain color I need. But instead of coloring one word or certain words until the end of the interaction with the sentence, for literally a second the entire sentence is colored for me, after which it returns to its original white color.
    What could be the problem? Code is the same, idk what is the problem, help pls :(.

  • @Arlegs
    @Arlegs 3 года назад

    Hey there, great tutorial. It has really helped me understand GMS 2. I've been following your tutorial very closely, however I'm getting this error everytime I trigger any textbox:
    ERROR in
    action number 1
    of Draw Event
    for object obj_textbox:
    Push :: Execution Error - Variable Index [0] out of range [0] - -1.float_text(100114,0)
    at gml_Object_obj_textbox_Draw_0 (line 234) - if float_text[c, page] == true
    I've been skimming through the floating text part about 3 or 4 times but I still can't figure out why that happens. All of the floating text code is almost identical to yours. I have been pulling my hair about this for about an hour now!
    EDIT:
    Okay. So. Turns out silly me was just tired and I put the float_text and float_dir in the function scr_text_color instead of the for (var c = 0; c

  • @GaiaFGC
    @GaiaFGC 6 месяцев назад

    Gotta thank you immensely for this. It's a perfect intro to UI manipulation in GML - always had programming fundies, just wasn't sure how to apply them. Amazing tutorial!

  • @cooldudeinc
    @cooldudeinc 9 месяцев назад

    What song is this in the background? Non-stop whistling it whilst making my game.
    Edit: Its still stuck in my head, months later. I am not even currently developing games

  • @williamcarrette389
    @williamcarrette389 2 года назад +1

    So these tutorials were great! My only problem is that when the textbox and dialogue is created, the textbox is anchored to the camera as it should be, but the dialogue is not anchored, so when I move, the textbox stays on screen but the words don't stay in the textbox, essentially I can walk away from the dialogue. Any idea how I fix it so the words get anchored to the textbox all the time?

    • @jakedouds1186
      @jakedouds1186 Год назад

      I'm also having this issue 😢

    • @paul7408
      @paul7408 Год назад

      @@jakedouds1186 same

    • @ploushie
      @ploushie Год назад

      Did you ever figure it out?

    • @ploushie
      @ploushie Год назад

      @@jakedouds1186 Did you ever figure it out?

    • @jakedouds1186
      @jakedouds1186 Год назад

      @@ploushie no I didn't, instead I built a system where the dialog only appears if the camera is still. Not an ideal solution at all.. but its all I could come up with :/

  • @super_bits
    @super_bits Год назад +1

    Make more effects!!! 😃

  • @rawl9022
    @rawl9022 2 года назад +1

    hey, the shaky text crashes my game whenever i skip to the next page too fast in a dialog (if i just keep spamming the accept_key) i tried playing around with the numbers but that didn't seem to do much. any ideas on how to stop it from crashing?

    • @rawl9022
      @rawl9022 2 года назад +1

      would also like to add that whenever it crashes, the error mentions shake_timer

    • @deymitsjeym
      @deymitsjeym 2 года назад +3

      Hey dude. Try changing
      "shake_timer[_c, page]--"
      into
      "shake_timer[_c, page] -= 1"
      and see if it fixes it for you. Haven't tested it many times and so far no issues. Otherwise, it might be chance.

    • @_bubblezzzzzz_
      @_bubblezzzzzz_ 2 года назад

      @@deymitsjeym This fixed mine, thanks

  • @jakedouds1186
    @jakedouds1186 Год назад

    Hey! Great video! I was wondering if you had a solution to getting the text in speech box to follow the view perfectly like the box and faces do :) anyhelp would ve much appreciated!😊

  • @mismatchingshoes5249
    @mismatchingshoes5249 2 месяца назад

    does anyone know how to make a rainbow text effect

    • @MrKoltuk
      @MrKoltuk 19 дней назад

      you have to set that individualy for every letter you want

  • @fierorecensione5828
    @fierorecensione5828 Год назад

    at this time, i think you have done more things than you have shown us, i didn't have many things that you have in scr_textbox_functions, did i miss something?

  • @rootvegetableboy3515
    @rootvegetableboy3515 10 месяцев назад

    this tutorial series is incredible and has been such a huge help for me getting started with gamemaker, i've been able to successfully apply a lot of what you've covered & transform the code accordingly to my own needs. your tutorials are clear and well-paced and i really appreciate all the hard work that you put into these videos! stoked to watch your other tutorials and continue the learning journey :]

  • @gassashadow1930
    @gassashadow1930 5 месяцев назад

    simplesmente incrivel

  • @saxenart
    @saxenart Год назад

    How do you trigger a conversation with an NPC? Now the conversation starts the moment you open the game but how do you trigger it with another NPC or a cutscene?

  • @valgarlienheart
    @valgarlienheart 2 года назад

    Thank you so much for this tutorial, it's been amazingly helpful. However I was wondering if you could help with with a random error that sometimes occurs.
    when compiling randomly it'll give me the error "trying to index a variable which is not an array" in relation to the line "var _txtb_x = textbox_x + text_x_offset[page];" in obj_textbox
    Once this happens it'll never work and I have to revert to a backup, I've double, triple and quadruple checked the code and it's exactly the same and this error occurs even though I'm not working with the obj_textbox
    Any ideas how to make sure this doesn't happen or some kind of safety? Thanks

  • @w3rt3x
    @w3rt3x Год назад

    Hello, Peyton! You are a great fellow, thank you so much for your videos. But I think this series has 1 small bug that gives us a strange visualization of the text. In general, you apply all the effects, adding angles,timers only to the characters that should be rendered at the moment, and this all needs to be applied to all characters every step so that the effect looks the way we want, i.e. before the text output cycle, we need to do a cycle for all the characters of the text that will respond for the effects.

  • @pedrohenriquegardinallidel6608
    @pedrohenriquegardinallidel6608 3 года назад +1

    I LOVE YOU
    FOR REAL BRUH

  • @hhdev
    @hhdev 3 года назад +1

    Really nice! Interesting indeed.

  • @LF21Hungry
    @LF21Hungry Год назад

    i got through the series now, thank you so much for "teaching" me how to make this
    i kinda did my own things a few times, but i still wouldnt've been able to do this without your awesome videos =D
    you're a legend, you know that?
    hope you get lots of support, you really deserve it for making such awesome tutorials

  • @jakehopper5204
    @jakehopper5204 2 года назад

    Question, anyone or yourself know how I could get this textbox to follow an object in a larger room.

  • @cautiousraven5427
    @cautiousraven5427 3 года назад

    I was really hoping if you could show us turn based combat also you've made a menu and text and dialog but how do i put that in my regular game (that game being from the base you made from how to make an RPG)

  • @PeachPuppy
    @PeachPuppy 2 года назад

    So I've made it so when my player obj meets the speak block it will begin the dialogue when space is pressed but this also seems to skip the first dialogue typing to the end. I know I need to delay it somehow so they won't overlap. Any idea on how to do that?

  • @DavidGarcia_249
    @DavidGarcia_249 3 года назад

    your videos are being a great help for my school project, since I am a beginner, I am making a rpg game inspired by Earthbound, could you make a video explaining how to do if I want my character to start a battle? sorry if my english is not very good.

  • @Jaffiest
    @Jaffiest 2 года назад

    Thank you, this series was very helpful and you explain everything so good!

  • @GermanTap
    @GermanTap 2 года назад

    I got stuck because you didn't include how to configure the npc

  • @DrJurdenPeterbergsteinlerwitz
    @DrJurdenPeterbergsteinlerwitz 3 года назад

    Hey! Question: How would I make it fit my window size? I have a very small window size (170 x 96) and the textbox is too big. I tried to scale down the text, but that messed up with the text border. I also tried to use draw_gui but then the textbox isn't shown (probably it is placed somewhere out of view). Any suggestions?
    Other than that, this is really a great tutorial series. Still at part 3 but asked here as this is the most recent episode. Keep up the amazing work!

  • @maxelized
    @maxelized Год назад

    That was a great tutorial, this will be simpler than using Scribble. Thanks!

  • @croverload
    @croverload Год назад

    This has been immensely helpful. It's been very hard to find an in-depth text/dialogue tutorial, and I can see why! It's pretty complex and not very beginner-friendly.
    I had the basics of a system down, and this series has given me the tools I need to make it do the stuff I want it to be able to do. I really appreciate you going out of your way to share your methods. Thank you!

  • @kingenderraptor
    @kingenderraptor 2 года назад

    I have an issue where my entire game freezes for a second when loading in a new textbox, any idea how to counteract this?

  • @tremitygames
    @tremitygames 2 года назад

    i need the project. Nothing worked for me. It all broke.

  • @artistagns
    @artistagns 2 года назад

    I'm having a problem: when the obj_speakblock triggers with my main character when i use the keyboard_check_pressed(ord("X")), the textbox just goes directly to the end, without the typing animation. Does anyone knows what is happpening with my code?

    • @weltonn
      @weltonn 2 года назад +1

      maybe this will help:
      if draw_char == text_length[page] //check to see if text is done typing.
      {
      if page < page_number-1 //go to next page.
      {
      page++; //increase the page value.
      draw_char = 0; //set the draw char to 0.
      }
      else
      {
      //link text for option
      if option_number > 0
      {
      create_textbox(option_link_id[option_pos]);
      }
      instance_destroy(); //destroy textbox when done with all the pages.
      }
      }
      else if draw_char != text_length[page] && draw_char > 2
      {
      draw_char = text_length[page];
      }

  • @billfox7200
    @billfox7200 3 года назад

    Omg, your tutorials are the best! You helped me soooo! Can you make a tutorial teaching how to make enemy encounters and fighting system?

  • @WolfieMoonDev
    @WolfieMoonDev Год назад

    Anyone Know How To Make An Npc's sprite to animate when it talks (not portrait sprite), the overworld sprite

    • @greenglubs
      @greenglubs 5 месяцев назад

      in your NPC's step event
      if instance_exists(oTextbox) //If the textbox is open
      {
      image_index = sNPCTalk //Change to talking sprite
      }
      else //If there is no textbox open
      {
      image_index = sNPCIdle //Change to idle sprite
      }

  • @choptop84
    @choptop84 2 года назад

    It'd be cool if you did some kind of cutscene tutorial, though that might be really hard!

  • @weltonn
    @weltonn 2 года назад

    how do I create a small icon inside the textbox after the end of the dialog?

  • @PeachPuppy
    @PeachPuppy 2 года назад

    Finished the the tutorials they were great, you got yourself a new subscriber!

  • @happy_cris95068
    @happy_cris95068 2 года назад

    I’m having trouble going from text to my battle room. Is there a way to make the scr_text do stuff besides display text and portraits

    • @lunastifaliamusic
      @lunastifaliamusic Год назад

      I think this series was specifically meant to just make borders, text typing, text, pages, and animations. But I would love for some answers or an expanded part to allow for things like engaging battles, sending you to another room, pausing during specific lines, stopping the player movement entirely until finished...

  • @kingparat1258
    @kingparat1258 3 года назад

    Awesome tutorial! Sorry to add another question into the mix but how would I go setting the default text colour to be black rather than white? (as the font sprite itself and _col1, _col2, _col3, _col4 params have to be white in order to be ready to be changed into a different colour, if they were black the change would be unnoticeable)
    Thanks for taking the time to make this video, you're a legend man!
    EDIT: Nevermind I figured it out, just had to change the intial color to c_black in the text functions script:
    col_1[c, page_number] = c_black;
    col_2[c, page_number] = c_black;
    col_3[c, page_number] = c_black;
    col_4[c, page_number] = c_black;

    • @hamishpawelski9851
      @hamishpawelski9851 2 года назад

      hey i also had this issue but my options text is still white do you know what I have to change for this?