Branching Dialog System with Effects in GMS 2! (Part 4: Character Portraits, sound effects, pauses)

Поделиться
HTML-код
  • Опубликовано: 29 дек 2024

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

  • @angrysoybeanfarmer3453
    @angrysoybeanfarmer3453 3 года назад +58

    I have made it to the fun, but at what cost

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

    I gave the voices variation by using audio_sound_pitch, specifically "audio_sound_pitch(snd[page], random_range(0.8, 1.2));"
    I'm using edited animal vocals and it sounds really fun, though potentially weird and creepy.

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

      super helpful, thanks for sharing!!

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

      @@cody7689 No problem!

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

      yooooooo animal crossing!

  • @AymenZero
    @AymenZero 2 года назад +16

    i can already do a lot of crazy things with what i just learnt from this

  • @winterblox1
    @winterblox1 2 года назад +9

    For the part where you need to select each txtb_spr that is highlighted with Find and Replace, you can click the { } icon to highlight words that are identical to what you put in (essentially, it looks for exact matches to what you put in instead of things containing what you put in), and then you can click the up and down arrow icon next to the Find Box to bring up the Replace Input (what you want to replace it with) and put in txtb_spr[page], then click the multiple tick icon (Replace All) and bam, all of your txtb_spr variables are now arrays (correct me if im wrong lmfao)

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

      Oh I don't know if I've tried that lmao! I'll have to give it a go!!

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

    For anyone who only prints a single character of text and sees it cut out. It means your brackets are off. The setup bracket starts and SHOULD end at the end of the new stuff (a line above typing text comment) and this made it work for me. Just copy them like in the video.

    • @MicahYaple
      @MicahYaple 11 месяцев назад

      Brackets are off where? Mine text boxes/portraits are showing up for a milisecond with one character of text appearing, then it all disappears.

  • @Learnjapanesefromsomeguy
    @Learnjapanesefromsomeguy 3 года назад +13

    Another awesome tutorial! Gonna start the last one later today.

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

    The textbox really comes alive with the portraits and sound effects! I'm still amazed he went this far without ever addressing the (potential) issue of text spilling out of the box on the Y axis, though.... Other than that, it's an extremely robust system.

  • @mehmetyigitkeskin5049
    @mehmetyigitkeskin5049 3 года назад +13

    Are you planning to make a cutscene system?

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

      Not sure yet! But for now you can look into “sequences in gms 2.3” for some good tutorials that will probably show you a lot of what you want to know!

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

      @@peytonburnham4316 Thanks :)

  • @catnipfatty4193
    @catnipfatty4193 Год назад +8

    Man, I finally screwed it up completely. Tried to take some shortcuts to make my life easier earlier in the series, and now it's all a tangled mess and I need to start again. That's on me though, good series lol

  • @Cloud_Spires
    @Cloud_Spires 9 месяцев назад +2

    I'm curious if there's a way to set the portrait up to where it can be above the dialogue box, rather than beside the textbox. I thought maybe making a y offset for the y position would work, but I'm not sure if that would even work properly.
    Additionally, I seem to get an error regarding the draw_text_color line in the object Textbox Draw event.
    ( Variable Index [2] out of range [2]
    at gml_Object_obj_textbox_Draw_0 (line 241) - draw_text_color(char_x[c, page] + _shake_x, char_y[c, page] + _float_y + _shake_y, char[c, page], col_1[c, page], col_2[c, page], col_3[c, page], col_4[c, page],1); )
    It prevents the dialogue from continuing, thus crashing the game.

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

      I also have that problem, have you already solved it?

  • @SpyingList25
    @SpyingList25 Месяц назад +1

    22:22 sound setup

  • @mirrorteru-viewing
    @mirrorteru-viewing 3 года назад +9

    Your tutorials have been so much help! I do wonder though-- I'm looking between this video and the next one, and-- is there a way to set a font color, or even, different font, to the specific characters/speakers? I'm fiddling around but not really... sure.

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

      Watch part 5!

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

      Oh I just saw you were mostly talking about font. Yeah it's the same exact principle as the colors and stuff, just make an array that stores a font for each character, then set that font in the section where you're physically drawing each character in that final loop!

    • @mirrorteru-viewing
      @mirrorteru-viewing 3 года назад +2

      @@peytonburnham4316 ---I realize I must of been too tired watching part 5 HA,,, sorry about that, but thank you!

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

    really awesome tutorial! I'm personally not going for a similar style of text box, but all of this is so extremely useful. such a great series.

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

    Welp, the 'fun stuff' turned out to be a nightmare worse that what unfolded beforehand... I'm stuck in two places: 1. My character sprite seems to pull a random sprite for some reason,. 2. The sound effect only plays up to one of the (., ?, !, ,) and then the window mysteriously closes... Been stuck with this for two days in a row. :/

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

      im having the same exact problem with the character sprite. if anyone has a solution to this it'd be greatly appreciated. super confused, i have no idea what i could've done wrong to make this happen

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

      For the character pulling a random sprite it had to do with having a [0] or some kind of number value instead of a variable like [page_number] in one of the arrays... maybe it was speaker_sprite[page_number] = noone; But i honestly can remember. Hope that helps debug the issue

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

    Hi!! Your tutorials are awesome! I've already learned so much from them!
    I am having an issue though, gamemaker won't run my game because 'text_x_offset' isnt 'set'. I'm really confused, because didn't we set it like this?:
    text_x_offset[p] = 44;
    Ive been rewatching and rewatching, all of the videos, but I can't find where I messed up...

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

      I hear you, and the solution is so easy you may cry. Your speakblock has no creation code connecting it the gametext. just add "text_id = "npc 1"; and it should work
      (edit: for reference, I was stuck on this problem for a about 4 days now)

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

      @@ianblasco5322THANK YOU

    • @faanross
      @faanross 11 месяцев назад +1

      i had the same issue thanks for posting, i added (text_id = "npc 1";) to my obj_speakblock Create event as suggested by @ianblasco5322 but it did not make a difference... any ideas? thanks

    • @stormstudios1
      @stormstudios1 8 месяцев назад

      i had the same issue and it didnt get fixed from @ianblascos solution, like @faanross . does anyone know any other way to fix it?

    • @kadenbrightwell
      @kadenbrightwell 7 месяцев назад

      @@faanross create event and creation code are different!

  • @Shot666
    @Shot666 Год назад +5

    pls i do need help with this error, its important:(
    Push :: Execution Error - Variable Index [2] out of range [2] - -1.speaker_sprite(100009,2)
    at gml_Object_obj_cajadetexto_Draw_0 (line 152) - if speaker_sprite[page_number] != noone {

    • @SJdarkdimensions
      @SJdarkdimensions 11 месяцев назад +1

      did you fix? it I have the same problem

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

      I FIXED IT! instead of page_number in the brackets on speaker_sprite, put page, if that does not work, put a "0"

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

    I've been trying to figure this out for a while, but whenever I call a textbox even without a face it says "trying to draw non-existent sprite"

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

    Hi, i tried this and got the textbox positioning working fine, but the text would sometimes go outside the textbox even though i did the offset stuff correctly. i solved this by getting rid of "setup = true" (so that it would repeat) but i don't think this was shown in the video... am i missing something?

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

      This helped me greatly. I was stuck on the same bug you were on for hours, making if statements and whatnot but nothing worked. So, I went into the comments to see if anybody was as dumb as me and found this comment. Thank you for unintentionally saving my game.

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

      I encountered the same problem. Thanks for the help, it fixed it. Let's hope it doesnt mess anything up down the road, lol.

    • @CrispyTRCS
      @CrispyTRCS День назад

      Thank you so much. I've been trying to fix this for days 😭

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

    Hey, not sure if you're still responding to comments but...
    if I wanted to add a special string/character for pausing, e.g. "{p}"
    how would I go about getting rid of the "{p}" before it's typed in the actual textbox?

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

    14:47
    bro i was why did i lough so hard

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

    Would be great if you showed this concept in "chat messenger" set up, where the npc, and player messages scroll upward, and all the player messages show at the bottom and have to push send for them to go up into the scroll chat.

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

    I've done everything so far and it works like a charm :D

  • @scootie_scoot
    @scootie_scoot 11 месяцев назад +4

    there's a bug with this system (unless i followed along wrong), if the player presses the "accept key" again while the textbox is typing, the typing sound will repeat

    • @dvannmi
      @dvannmi 5 месяцев назад +1

      hey, i'm still struggling with this problem, did you solve it? it's possible to use 2 buttons for the dialog box, but it's still stressful for me....

  • @jason256-8
    @jason256-8 2 года назад +1

    I want my text box to be narrower when there’s a speaker Sprite present than when there’s no speaker Sprite. How do I do it?

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

    Hello! For some reason, im getting a text_x_offset error whenever I run the game saying that it is not set even though I followed the tutorial and double/triple checked my code. People in the comments have fixed it by setting their text id creation code to the same code as the scr_game_text script switch but mine was already like that!
    This error seems to not let me have "noone" as my default for speaker_sprite[page_number] either! It will not show any text that I haven't set "blue kid" as a [character]. Like it will literally skip over any text that hasn't been asigned any [character]. While I can continue the tutorial for now, since I have to manually type in "noone" in as the [character] in scr_game_text, that really defeats the purpose of the defaults script and makes me sad =(.

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

      I am a fool it was a syntax error. I simply did not close the if statement above my switch function with brackets correctly.
      hopefully this helps someone.
      I need a nap...

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

      which switch function are you talking about? i think i might be having the same issue

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

      @@plagueparchments it has been a month so I'm not exactly sure what I meant but go through all your code and make sure your brackets {} are properly written or properly closing your functions. I happened to have stray } missing which messed up mine.

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

      @@memeslandofawesome thanks dude!

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

      @@plagueparchments did you solved it?

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

    Awesome!! It would be interesting to maybe add a third param in the scr_text function to account for changes in speed? So some character's typewriting effect can be slower and others can be faster. Just an idea.

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

    If anyone missed this while trying to add vocal sound effects - for some reason mine weren't loading, I checked and it said "Audio Group 1 is not loaded". To fix this I entered this code right above the var _check_char section:
    if !audio_group_is_loaded(NAME OF YOUR AUDIO GROUP)
    {
    audio_group_load(NAME OF YOUR AUDIO GROUP);
    }

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

    14:33
    just a timestamp for myself

  • @jason256-8
    @jason256-8 11 месяцев назад

    I’m now making a new game and I would like to use actual voice lines rather than voice blips for my dialogue audio. For text, I modified scr_text to add another optional parameter which determines which audio/voice line would play. However, I only keep the voice blips for any lines that no character is speaking.

  • @matt.137
    @matt.137 2 года назад +1

    for whatever reason, the box that is supposed to surround the character sprite in the textbox just doesn’t appear. though it had to do with the draw speaker section but i checked it and that’s not it.
    not sure what happened, lol

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

      hey, were you able to solve it? i have the same problem :(

    • @matt.137
      @matt.137 2 года назад +1

      @@sebasgac sort of, i just had to mess around with the math on the draw function, and get the box to actually draw around the sprite correctly

  • @RealHeyItzDark
    @RealHeyItzDark 7 месяцев назад

    is there a way to shrink the textbox width when a portrait appears?
    say if i have an undertale-size textbox and i want it to scoot over to the right, the textbox goes a bit offscreen. can you shrink the width so it can load the whole text not cut-off?

  • @서울에서의위시리스트
    @서울에서의위시리스트 3 года назад

    thank you so much for uploading this. this is really helpful

  • @randomperson.1281
    @randomperson.1281 2 года назад +4

    Hey Peyton, or anyone who can help, If I wanted the character busts (that have a high resolution) appear instead of character portraits, I'll need a draw GUI layer right? since the game size is 288x216, I tried setting that by myself but it doesn't work, if anyone have suggestions please tell me :)
    my draw GUI event:
    if speaker_sprite[page] != noone
    {
    surface_resize(application_surface, 288, 216);
    display_set_gui_size(1152, 864);
    sprite_index = speaker_sprite[page];
    var _speaker_x = textbox_x;
    var _speaker_y = textbox_y - sprite_height;
    if speaker_side = -1
    {
    _speaker_x += sprite_width
    }
    ///--------- ///drawing the speaker (real action)-----///

    draw_sprite_ext(sprite_index, image_index, _speaker_x, _speaker_y, speaker_side[page], 1, 0, c_white, 1)
    }

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

      Go check out pixelated pope's video on simple camera, then take everything from your draw event and stick it in the Draw GUI (keep a blank draw event), change textbox_x and textbox_y from camera_get_view_x/y respectively to whatever; wherever you want it to appear on the GUI layer. That should sort ya out. That'll let you zoom the camera in at different scales without affecting the position or scale of the textboxes.

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

    so what if i have a character portrait that has a higher resolution than the scale of the room, so like the room is 288x216 and my portrait is 1628x2100, how can i scale down the portrait without losing the resolution?, some said i should use draw gui but i just cant wrap my head around it

    • @h4bicatani
      @h4bicatani 5 месяцев назад +1

      you can't scale down an image without losing resolution, i would recommend drawing a simpler sprite

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

      same, sadly i dont know how to help you but am scaling the image down till it can fit
      i wish there was a way to do it , i think somehow you can make the sprites into objects then scale them from the create event but idk

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

    Oh my god thank you so much

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

    Hey! I have a simple question. When you write ALL of the dialog in one script, isnt that script gonna have 1000+ lines at least? woudn't that make the game slower with one script instead of maybe using the creation code for every object? Sorry if im wrong xd. Just wondering! love your videos :D

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

      I think it's the same either way, and you don't need to go looking for the object that has the text

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

    I'm having an issue, when the first line of text is full, it the text goes to the second line like it normally should. But the Second Line of text don't form a sentence, the words just go downward, and the lines are all seperated by a whole lot

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

      Were you able to fix it, I had the same problem and was able to fix it, I could check it out (because I forgot) to share what I did if you didn't solve it yet. Thank you

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

    10:33 (note for later)

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

    It is mentioned that you could use an array to set a different delay value for each sound, does anyone know how exactly I would go about doing this?

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

    Anyone know how to stop your character from moving while they're interacting with dialogue? I've been trying multiple ways and followed this tutorial as much as I could, but I can't seem to get it to work--

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

      make your obj_textbox or any of the things you want to get your character to stop as a children to your obj_pauser

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

      @@deontan602 oh! Thank you for the help, but I actually figured it out myself! Thank you for your help though!

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

      @@viperizer0 could you explain what you did? I'm trying to do this as well

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

      @@holiday_out3740 I’ll try my best! Not gonna lie, I’m still kinda new to coding so I’m not entirely sure why it worked… lol.
      In my character’s object step event, this is the code I wrote.
      If instance_exists(obj_textbox) && distanceTrigger { move_spd = 0; }
      Else { move_spd = 1; }
      Keep in mind that in the object areas you have to replace them with whatever you named your stuff… make sure you set the variable distanceTrigger = 2 in the create event…
      I think this is all? If not, lemme know and it’s probably not the prettiest way to do this- oh yeah, if you had a sprinting ability it does take that away and I’m not entirely sure how to fix that… but I hope this helps!

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

      @@viperizer0 Thank you! I came up with something super simple.
      In the player object step event, before anything else like movement
      if ( instance_exists(obj_textbox))
      {
      exit;
      }
      and now your player doesn't move while dialogue is active
      cheers!

  • @gustavpng
    @gustavpng 2 года назад +14

    OMFG! I was stuck in a error for hours!!
    Anyone who is getting the " var _txtb_x = textbox_x + text_x_ofset[page]; " error, please remember: If you change the " case "npc 1": " in game script, you need to change the new name into the speakblock at your room (text_id)!!!!!!!
    I searched about it everywhere and I just realized it abot this now!!!!!
    if that doesnt work, try it to put " text_x_offset[0]= 0; " on obj_textbox Create page.
    Hope this help anyone, good lucky :)

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

    im trying to figure out how to have it so the right side portraits dont flip, my characters face the camera so its not needed

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

      nvm, i was changing the wrong thing, just change speaker_side[page] to 1 at 9:57, you'll have to mess around with positions a bit

  • @style_13
    @style_13 7 месяцев назад

    Hiya! Maybe quick question, I have imported art for the sprites/character portraits, is there a way to make it fit into the box for the character speaking even tho it is not 64 pixels?

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

    Hey so my audio stops playing when any one of the . ? ! , appears in the text box, any one know how to fix that?

  • @pawemania5462
    @pawemania5462 3 месяца назад

    Got a problem - after implementing this cool pauses - dialogues are looping. Last page (line) of dialogue is endlesly repeating, and/or other pages too.
    Maybe someone struggled with similar issue and knows the answer?

    • @pawemania5462
      @pawemania5462 3 месяца назад

      Found a source for that:
      if keyboard_check_pressed(ord("E")) && distance_to_object(obj_Player) < 10 - object speakblock, in the step event instead of this mouse poisition was put by me... 'cause I want to use only keyboard for operating my game... Now trying to figure it out how to get rid of mouse and this bug when using keyboard!

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

    Hi, anyone knows how i can search for that type of sound effect? i mean, if have a specific name, because i cant find anything like that

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

    I don't know what I did wrong, but when I start the dialogue with an npc, the text flows correctly, and the npc's portrait animation works, but when its the player talking, the text automatically goes to the end of the textbox e the animation don't work. Did you understand my problem? Can u help me?

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

      it's solved 😎👍

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

      @@hayuralves1207 what was your solution? After setting up my arguments in scr_textbox_functions, cases inside of scr_game_text no longer display unless I provide an id for each specific case. It skips over that line of text and continues on unless a sprite is assigned to that scr_text.

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

      Nevermind, after combing through the video several times I found an extra set of { } which I somehow placed inside the scr_game_text...

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

    i am having a problem where the speaker charactor doesn't appear and it takes a random sprite form the files for some reason, anyone can help?

    • @hyoon1366
      @hyoon1366 4 месяца назад +1

      wow i just solved it after i posted this in 5 min, the problem was that i typed in the scr_text at line 7 speaker_sprite = [page_number] = noone;
      while it was spoused to be speaker_sprite[page_number] = noone 😭

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

    I don't know if I'll get an answer here but it's worth a shot. I'm using 8 Bit Operator font text (Undertale/Deltarune font) and inserted it exactly as the video says. It writes fine! However, my spaces in between the words seem to be a little short for some reason? In other words, each word is too close to another. It's been almost a year since I followed these tutorials and I finally got back to the project. I can't seem to find a way to make my spaces in between words larger. Any suggestions would be helpful! I've tried making the width of the actual font larger but that didn't seem to help.

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

      Would be better if you tried locally storing the font characters as one big spr_fontmain asset as that allows you to mess with seperation using the font_create_sprite(); function

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

    Hey if anyone could please help me, the left and right sides of the texboxes for the character portraits are showing up squished, and on the options all of the sides are squishes. The options were showing up fine before i wrote this section of code

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

    Many thanks to you!

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

    This is sort of a weird issue, but the local variable I declare with a script seems to override any params I set. Maybe it's a setting I accidentally disabled, but it's pretty annoying.
    Here's an example:
    /// @param text
    /// @param [character]
    function scr_text(_text){
    When I call scr_text, the bottom of the window will only show scr_text(_text). Does anyone know what I did wrong?

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

      same, have you sloved that prob?

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

      not familiar with gms2, but maybe it should be "function scr_text(_text, [character])"?

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

    Hi¡ I’m having this issue where the dialog and sound is significantly faster on the first page of dialog but it works perfectly second page onwards, anyone knows what might be causing it? 😢

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

    my apologies for asking for help on a video over 2 years old, but when a portrait is drawn, the place of the linebreak isn't adjusted accordingly, meaning the text will go over the edge of the textbox. does anyone have an idea as to how i can adjust the linebreak to be in the correct place? as well, this isnt as relevant to this video specifically, but more the series as a whole, is there a way to have the text aligned to the centre of the textbox as opposed to the left? thank you!!!!!!!!

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

      Did you figure it out? I have the same problem

    • @Ttsradko
      @Ttsradko 7 месяцев назад

      I figured it out now. After setup is done it needs to switch back to "setup = false" again.

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

    How do I make it so that it plays a random sound from a group on each letter?

    • @熊维霓
      @熊维霓 Год назад

      you can use choose(...).

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

    I need help, I'm in the part where we make the code to draw the portraits, but my character portrait isn't drawing, or is drawing below the portrait box, what do I do?
    Edit: what happened was that the sprite was getting mirrored and blocked by the main text box... maybe I switched up some 1s and negative 1s...
    Edit 2: I FIGURED IT OUT, turns out the negative and positives had meaning haha, im dumb, the way i solved the issue is by asking myself randomly "okay i need to add the sprite back to put it in place when it flips... Wait why does it even flip? Theres no code that-" and then i realized! Btw my default is having the portraits on the right side so thats why i had issues

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

    thank you so much! this is fabulous!

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

    IDK if anyone can help me but I have this error and I don't know to fix it
    The error: Got "}" (eof) expected } or end. But I have } at the end
    can someone help?

    • @randomperson.1281
      @randomperson.1281 2 года назад

      I can't really help since I don't have your code and stuff, what I really recommend is going back to the video and speed it up and check if every line is correct
      also a tip, everytime you run your project and everything goes good put a comment or mark like "///nothing to check here" under the code you finished so that you don't touch it or mess with it accidentally and to not waste time to go back over the whole video to check all your code, maybe the mistake is something new you added and you just need to go back few steps

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

      not sure if this is it but i had a similar issue and it was because i didn't have the right amount of } around an else statement. It was during the part in the tutorial when we were doing the stopping at "." around 21:00 or so. Not sure if that helps

  • @molly16474
    @molly16474 Год назад +4

    does anyone have any tips for how to make a character cycle through different lines of dialogue each time you click on them, or how to only trigger certain dialogue options after something else has occurred (ie picking up an item or something)?
    very new to gamemaker and this tutorial series has been SUPER helpful, I just find myself getting stuck when I need a certain event to occur before triggering a section of dialogue (or if I dont want the char to keep saying the same thing over and over again)

    • @molly16474
      @molly16474 Год назад +3

      EDIT: figured out a solution!
      if anyone's wondering how to make certain events/new dialogue trigger based on the player's responses, I just initialized a few global variables in the obj_settings create event and you can change them in the scr_game_text function in each specific case.
      for ex, I set global.quest = false in obj_settings, and then under the specific case i want to trigger something I changed it to true. example:
      case "npc 1":
      if global.quest == false
      {
      scr_text("this text will trigger the quest");
      global.quest = true;
      break;
      }
      if global.quest == true
      {
      scr_text("quest is now triggered!");
      break;
      }

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

    I'm getting an interesting error where depending on my usage of "npc 1" and "red kid" (my version of blue kid) i can either get the unpersonalized dialogue box w text, options and it all works but no speaker and it's in the middle. OR, I can get the personalized layout correct, but before text appears I get:
    Push :: Execution Error - Variable Index [15] out of range [15] - -1.char(100060,15)
    at gml_Object_obj_textbox_Draw_0 (line 210) - draw_text( char_x[c, page], char_y[c, page], char[c, page] ######################### gml_Object_obj_textbox_Draw_0 (line 210)
    Any help on how I can get them to work at the same time would be really helpful!!!

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

      you forgot a bracket at the end i thiknk

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

    can someone help me there's an echo in the sound when it is typing a text

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

    👏👏👏

  • @jason256-8
    @jason256-8 2 года назад +1

    Sorry to say this but I can’t do your text boxes tutorial anymore. It’s really hard for me to make my own text boxes look like one from Undertale, considering that for your tutorial, 2 boxes are used for a speaker Sprite being presence but one box for Undertale, or any other fangame. Thankfully, I still managed to make the ones without the speaker Sprites.

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

      im kinda late but how did you manage to do that? (hopefully someone will see this comment)

    • @jason256-8
      @jason256-8 Месяц назад

      @ I do feel like if maybe you might have to code on your own for this kind of text box or follow a different tutorial. I had to take Computer Science in university to further enhance my coding skills.

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

      @@jason256-8 ohhh i see... dang 😭
      but I'm glad you're properly studying this kinds of stuff! that's awesome!

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

    I love these videos, they've helped so far with my tiny puzzle/ escape room game. However, does anyone know how I can go about using the spr_greenkid/spr_bluekid, ect. as an array to flip through sprites the way we would with the house decorations?

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

    I just spent an hour and a half pulling my hair out trying to figure out why the game was crashing and telling me variables that I definitely set weren't set. Turns out I just forgot to put the text_id in the creation code. Don't code while sleep-deprived, kids.

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

      Was it the text_x_offset that wasn't working for you either?

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

    Hey, I've been following the tutorial and I have a question, my output keeps telling me my "Push :: Execution Error - Variable Index [1] out of range [1] - -1.textb_spr(100007,1)". I'm fairly new to gamemaker/coding in general so I am so confused on what this means. It referencing this:
    "textb_spr_w = sprite_get_width(textb_spr[page]);"
    And I know that the error has something to do with the array I set for my textb_spr variable, but for the life of me I can't figure it out! I have an array there which is exactly the same as what he set!
    So, I don't know what I'm doing wrong!

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

      I also have this error too :( Did you manage to find a solution for this?

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

      same error, I will get to you if I found it lol

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

      @@loutrechan8332 did u find it

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

      omg i have the exact same error as well ;-;
      EDIT:
      I found a fix, but its gonna need sacrifice. I don't know why it isn't working normally, but here it is:
      Replace all the txtb_spr[page] arrays with txtb_spr[0] in the draw event, atleast thats how i fixed it
      the sacrifice is that you cant get anymore custom backgrounds for different characters... it can still look cool but not in that way

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

    Cool!

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

    can someone help me? I'm having this error with the speaker_sprite != noone
    ___________________________________________
    ############################################################################################
    ERROR in
    action number 1
    of Draw Event
    for object obj_txtbox:
    trying to index a variable which is not an array
    at gml_Object_obj_txtbox_Draw_0 (line 122) - if (speaker_sprite[page_number] != noone){
    ############################################################################################
    gml_Object_obj_txtbox_Draw_0 (line 122)
    and, yeah, I tried with speaker_sprite[page] != noone {, but it doesn't work either. I tried changing the [page] with [page_number] just in case

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

      easy fix! instead of using [page_number], use (speaker_sprite[argument[2]]), which is an array!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

      thx!!@@sillylittleboy6361 could you help me with smth else too? I'm trying to do a cutscene that goes like- "Text", "Image" & "Another text" on top of the image. I have no problem with the first text appearing automatically and disappearing, but I can't make the image appear.
      I set a variable that, when the script marks it as true, the text disappears. Not only that, but I tried to do the same with the create_image_ext, but it didn't worked.

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

    Idk why but my audio loops infinitely, someone is having this same problem? I know i'm a bit late for ask this lol

    • @AnimaGobs
      @AnimaGobs 8 месяцев назад

      you can do smth like
      If !audio_is_playing(your audio Index)
      {
      //Sound system or smth
      (Your sound system right here)
      }

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

    19:00

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

    25:44

  • @__TV33__
    @__TV33__ 8 месяцев назад

    I'm really hoping someone sees this comment because I can't figure out for the life of me to have it to work so that instead of interacting in this practice room, it will show text when I interact with objects or NPCS in my actual game. Any ideas please I have actually shed tears over this now.

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

    is anyone else getting the error "Variable .text_x_offset(100089, 0) not set before reading it.
    at gml_Object_obj_textbox_Draw_0 (line 185) - var _txtb_x = textbox_x + text_x_offset[page];"

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

      nvm im an idiot found a comment that explained it

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

      @@nesciovir7750 where

    • @stormstudios1
      @stormstudios1 8 месяцев назад

      @@nesciovir7750 what was the answer??

    • @nesciovir7750
      @nesciovir7750 8 месяцев назад

      @@stormstudios1 so basically you need to give the child object the text variables. it been a minute but you need to make sure in the creation code of your CHILD object (the one your pc is interacting with, not the parent) has what it needs because thats what gives "text_x_offset" its value, otherwise it will be null and the program will freak out.
      thats atleast what my problem was.

    • @OKEd-k7x
      @OKEd-k7x 6 месяцев назад

      @@nesciovir7750 ?

  • @OKEd-k7x
    @OKEd-k7x 6 месяцев назад

    Umm I broke somthing
    ############################################################################################
    ERROR in
    action number 1
    of Draw Event
    for object ObjectTextBox:
    Variable .text_x_offset(100069, 0) not set before reading it.
    at gml_Object_ObjectTextBox_Draw_0 (line 167) - var _textbox_x = textbox_x + text_x_offset[page];
    ############################################################################################
    gml_Object_ObjectTextBox_Draw_0 (line 167)

  • @SpyingList25
    @SpyingList25 28 дней назад

    18:59