Cute and Simple Dialog Box | Let's Godot

Sdílet
Vložit
  • čas přidán 2. 07. 2023
  • Taking inspiration from 2019's hit indie game A Short Hike, let's make a very clean and easy textbox. All we need is a textbox scene and a dialog manager to get talking NPCs for our Godot indie game. :)
    🎵 Tropicala - ConcernedApe
    🎵 The Sun Can Bend an Orange Sky - ConcernedApe

Komentáře • 381

  • @samlee5774
    @samlee5774 Před 8 měsíci +16

    This is wild, i've been trying to do this ages but never thought to await resized. Thanks!

  • @ian8448
    @ian8448 Před 4 měsíci +13

    If you want to be able to change the scale of the text box and it still to be in the correct position compared to who is saying it:
    In the textbox display_text() function when you set global_position.x and y multiply it by the scale.x or scale.y accordingly.
    ex: global_position.y -= (size.y + 24)*scale.y

  • @Pablito_Dev
    @Pablito_Dev Před 6 měsíci +2

    Works Perfect! thank you so much, im new at gameDev and godot so this was super helpful !

  • @notoreofreakshake
    @notoreofreakshake Před 6 měsíci +1

    instant sub, no hesitation. great video!

  • @bluemelonstudio
    @bluemelonstudio Před 3 měsíci +1

    Thanks friend for sharing, your tutorials are amazing

  • @ianjameshouse
    @ianjameshouse Před 4 měsíci +1

    This is amazing, thank you

  • @ricanamvs3390
    @ricanamvs3390 Před 11 měsíci +24

    I'm really liking your godot videos. Do you plan to continue the tutorials?
    Thanks from Brazil

    • @DashNothing
      @DashNothing  Před 11 měsíci +12

      Thank you! Yeah, I'm working to get a video out every week

  • @brensnorf
    @brensnorf Před 3 měsíci +1

    I'm having a slight issue if you have any ideas on how to help; one of the places i'm trying to use the dialogue manager in game is a menu that runs while the game is paused. while I’ve been able to find alternate solutions to the "needs to be unpaused" elements, queue_free() in specific is my final hurdle from what I can tell. (at least, I assume queue_free() only works when the game is unpaused... anyways, are there any alternatives to queue_free() that may work when the game is paused?

    • @DashNothing
      @DashNothing  Před 3 měsíci

      I'm not sure, but you can try using free() instead of queue_free() as it doesn't wait until the next frame to free an object.
      But unfortunately, I think the bast course of action is to implement a custom time scale that will only affect specific nodes. It would work by multiplying their velocities, animation speeds, and whatever else needs to be paused, by a custom time scale amount. They eill effectively be paused, while your UI and audio will work like normal.

  • @delqyrus2619
    @delqyrus2619 Před 7 měsíci +2

    Nicely done. The only thing i would think of to improve it is to generalize the text timer/label(make it his own scene), so you can have coherent text behaviors between different types of displaying text. I have played a lot of games, where it was so annoying that different types of text ran with different speeds/behaviors...

    • @DashNothing
      @DashNothing  Před 7 měsíci +2

      Great idea. That would also allow adjusting text speed in the settings.

  • @looves132009
    @looves132009 Před 7 měsíci +2

    I love following your tutorials! I just have one issue I'd love your advice on. The "[E] to interact" label still appears on top of my dialogue box. How can I make it so once I hit the interact input, the label disappears so I can read the dialogue box without the "[E] to interact" text appearing on top?

    • @DashNothing
      @DashNothing  Před 7 měsíci

      Thank you!
      In your _input(event) function you'd get the label like $Label and call .hide() on it to hide it.
      In the _ready() function you would connect to DialogManager's dialog_finished signal and in the callback function call $Label.show() to show it again..

  • @hirador3879
    @hirador3879 Před 6 měsíci +2

    Useful and good tutorial. 👍

  • @jboadas
    @jboadas Před 11 měsíci +4

    Nice tutorial, thanks.

  • @unconscious5630
    @unconscious5630 Před 6 měsíci +1

    With long texts in my dialog the size.y after the two awaits only ever is 88, never greater, even if the text makes the box larger than that. This causes the text bubble to grow as more letters are added to it rather than stay the same size. Do you know why this could be happening?

    • @DashNothing
      @DashNothing  Před 6 měsíci

      I experimented and I couldn't recreate your problem. Is the number 88 something you use in a different place (like MAX_WIDTH)? Also ehat version of Godot are you using?

  • @Just_an_animator
    @Just_an_animator Před 2 měsíci

    Thank you SM bro

  • @Dr4w.
    @Dr4w. Před 5 měsíci +1

    A Good Tutorial Although one Problem i keep getting is Identifier "_on_text_box_finished_displaying" not declared in the current scope. i don't know why but is there a way to fix it?

    • @DashNothing
      @DashNothing  Před 5 měsíci

      9:37
      Did you forget to implement this function? Or maybe you misspelled the name?

  • @Danny1981able
    @Danny1981able Před 5 měsíci +1

    Where do you put the InteractionLabel code? I know its an anutoload but I don't see it when its built and I'm having problems with my project.

    • @DashNothing
      @DashNothing  Před 5 měsíci +1

      For this video I made a scene called InteractionLabel of type label and a script attached to it with a function to show and hide the label. Then I autoloaded that scene (you can autoload scenes as well as scripts which is quite nice).
      This approach isn't the best and I only did it as a quick and dirty way of getting the point across for the focus of this video, which is the dialog system.
      If you are interested in an easy and flexible interaction system that works with the dialog system from this video, check this out: czcams.com/video/ajCraxGAeYU/video.htmlsi=uiRgGisX6dkcqGpr

  • @Flumbingus
    @Flumbingus Před 2 měsíci

    love this style of game dialog! but I was wondering if you knew a way to incorporate bbcode into the text? changing the label into a richtextlabel works and everything but I don't want the bbcode to be printed in the textbox along with the dialog, do you know if there's a way to make it skip the bbcode syntax so it doesn't get printed out?

    • @DashNothing
      @DashNothing  Před 2 měsíci +2

      Thanks! I would have to look into it, but I'd say you'd have to add the open and close bbcode tags into the label before showing the first letter of the line. At the dame time you'd have to change the string in the lines array to remove the bbcode tags. Then if the letters get put in between the tags in the rich text label I imagine it would work.
      Sounds like a good topic for a video, I'll keep it in mind.

  • @heylavenderbee
    @heylavenderbee Před 9 měsíci +2

    Thank you so much for this tutorial!
    There's only an error that I just couldn't fix...
    When you use the connect function in the DialogueManager, connecting 'text_box.finished_displaying' to '_on_text_box_finished_displaying', it just doesnt work for me
    This is the error message: Invalid get index 'finished_displaying' (on base: 'MarginContainer').
    I guess that means that it has something to do that I may wrote the name wrong or something.. but I really don't know, could you help?

    • @DashNothing
      @DashNothing  Před 9 měsíci

      I'm glad you enjoyed the video!
      Check if your finished_displaying signal in text_box.gd is spelled correctly. It needs to be spelled the same in text_box.gd and in DialogManager.gd when you connect it.

    • @MudpuppyGames-zn2qw
      @MudpuppyGames-zn2qw Před 4 měsíci +1

      after a LOT of trial and error, for me the problem was that the preload("the_text_box_location.scn") was not the actual MarginContainer with the script but a parent node, therefore it couldn't load the proper script because it was searching one node above it.
      to fix this, i made the branch with the TextBox and its children a seperacte scene and preloaded that scene instead

  • @TurtleSensor
    @TurtleSensor Před 3 měsíci +1

    I'm not sure where I messed up, but I don't see the textbox UI appear? I added some prints and I can see it printing to console the text lines and responding to my taps

    • @yxgen4
      @yxgen4 Před 3 měsíci

      it might be behind your current layer!

  • @EliSprinkle
    @EliSprinkle Před 6 měsíci +2

    A more in depth look at the test guy script would be appreciated! i followed the interaction manager and dialog manger videos and still a little bit confused.
    i see there is 2 signals on the test guy script for _on_interaction_area_body_entered and exited. i tried creating finding those signal in the node tab under the interactionarea object.
    where does the "InteractionLabel" come from??? is that a @onready var as well? much thanks!

    • @DashNothing
      @DashNothing  Před 6 měsíci +1

      I didn't go in depth with it because I only wanted to demonstrate the text box, whereas the interaction system I left up to the viewer. That being said, the system I had for this video was a bit hacky, with the InteractionLabel being a singleton any object can reposition. All in all I wouldn't recommend it.
      But if you're interested, I recommend the interaction system from this video:
      czcams.com/video/ajCraxGAeYU/video.htmlsi=T55JLX8nxWCiYC2b
      It's a very flexible system and works well with the dialog system from this video.

    • @EliSprinkle
      @EliSprinkle Před 6 měsíci

      i have all the scripts written up with no errors, it is the implementation i am having trouble with. i have DialogManger, InteractionManager, InteractionArea scripts and object all good to go.@@DashNothing

    • @EliSprinkle
      @EliSprinkle Před 6 měsíci

      is there a way a better way i can contact you? i really wanna implement your way of dialog and im a inch away from getting it to work@@DashNothing

  • @TheArsonistGamer
    @TheArsonistGamer Před 8 měsíci +6

    Followed everything in half speed, did everything i THINK right, but when i run i get an error that states :Invalid set index 'interact' (on base: 'null instance') with value of type 'Callable'. (It highlights my onready function func _ready():
    interaction_area.interact = Callable(self, "_on_interact")

    • @sims_berner
      @sims_berner Před 6 měsíci +3

      i hate that he talks so fast. these are great tutorials, but run so fast it's hard to keep up and understand what's happening.

    • @DashNothing
      @DashNothing  Před 5 měsíci

      For anyone getting this error - make sure you get your interaction area node with @onready var interaction_area = $InteractionArea and that it's in your scene

    • @yxgen4
      @yxgen4 Před 3 měsíci

      are you using godot 4? I had this error but I was using godot 3.5

  • @ItzAstroTheNoob
    @ItzAstroTheNoob Před 3 měsíci +2

    Thx! this helped me a lot on my Indie game (even tho all the code gets me tired 😅)

  • @m1chael_dev
    @m1chael_dev Před 8 měsíci +1

    Its a really neat tutorial. Do you know how this can be implemented for 3d games? Thanks

    • @DashNothing
      @DashNothing  Před 8 měsíci

      To display the text box in 3D you could use the Sprite3D node and assign it a viewport texture to render a viewport with the UI. Here's an example for Godot 3.5, but the general method is the same for Godot 4: godotengine.org/asset-library/asset/127

  • @NDragonGames
    @NDragonGames Před 8 měsíci +3

    This video gave me headache :)
    But it worked at the end haha

  • @sixsalt1406
    @sixsalt1406 Před 3 měsíci +1

    Hello, so I noticed you didn't show how you made your interaction label class and subclasses, I was wondering if this was in a previous video?

    • @DashNothing
      @DashNothing  Před 3 měsíci +1

      I made the tutorial for the label and thr whole interaction system here czcams.com/video/ajCraxGAeYU/video.htmlsi=maNwZcsNesei19qb

  • @luckyknot
    @luckyknot Před 2 měsíci

    This tutorial was excellent, very well explained and enjoyable to follow along! I'm working on dialogues that have different branching. how would you go about adding conditions and in-game variables that can affect/be affected by dialogues, branching to a new line or entire new text? Maybe it's solvabe with a 2D array? so the first order would store the dialogue line, and the second order of the array would save a certain number of variables? it's seems that things can start getting a bit unmanageable though...

    • @DashNothing
      @DashNothing  Před 2 měsíci +1

      Thank you!
      I thought about it, and even though this is off the cuff, this is the direction I'd go in:
      - No, don't use nested arrays because the nesting would go crazy even at a few branching options.
      - There are tools to visually edit dialogs or ones that use a scripting language made for creating text based games with branching paths. You can find these in the Godot asset library.
      - If you want to do a quick custom implementation because your use case isn't too complicated (and I respect that and would probably do the same), I'd make seperate array variables for each branch of the dialog. For the lines where there's a decision to make I'd use a dictionary with the reference to the lines array a choice will lead to. Example:
      var hello = [
      "Hey!",
      {
      text: "How are you?",
      choices: [
      {
      text: "Good",
      next: goodResponse,
      },
      {
      text: "Bad",
      next: badResponse,
      },
      {
      text: "ATTACK",
      condition: player.has_weapon(),
      func: aggro_target(player)
      }
      ]
      }
      ]
      var goodResponse = [
      "I'm glad!"
      ]
      var badResponse = [
      "Sorry to hear that"
      ]
      I'd love to try to make that work. Hope this helps!

    • @luckyknot
      @luckyknot Před 2 měsíci

      @@DashNothing Thanks for taking the time to reply and write this example, After thinking about it, as I have many text and branching, to make it easier to manage and edit I think that I will go with a Google Sheet, a tab will be a scene that contains all the dialogues for that scene. Each scene will have a column to jump to a relative row or ID in another scene if needed, so if I move a row (dialogue line) that contains a jump, the reference should not break as it´s relative. Then parse it all to a csv with the proper data, and import into the game as a List of Arrays. I'll give it more thought let's see, thanks again!

  • @Jdaucfqluoess
    @Jdaucfqluoess Před 2 měsíci +1

    I love it, just implemented it in my game. Question anyone : how would you prevent the player to move during the dialog ? is there a way to capture the input event ?

    • @DashNothing
      @DashNothing  Před 2 měsíci +2

      I implemented that feature in the follow up video to this one. Basically, I just call player.set_process(false) when the dialog starts and player.set_process(true) when it finishes.

    • @Jdaucfqluoess
      @Jdaucfqluoess Před 2 měsíci

      @@DashNothing tranks, I just looked the next video. Actually you check DialogManager.is_dialog_active at the beginning of _process.

  • @aidenquinn3329
    @aidenquinn3329 Před měsícem

    I got the textbox to work but now I want it to spawn under the player when I enable it, is there any way of doing this. Until than Imma just keep trying till it works.

  • @rodneyyt-lf4rd
    @rodneyyt-lf4rd Před 3 měsíci

    Good vid, its working for the most part. For some reason, when i get to the sixth line in my seven line array, the textbox offsets to the bottom right, no longer accepts input to advance lines, and the text immediately displays all of itself instead of reading letter by letter. im not sure what to look at first to figure this out.

    • @DashNothing
      @DashNothing  Před 2 měsíci

      There is a problem with short lines that block the text box because the label is not wide enough to trigger a resize. Could it be that ykur sixth line is only a few characters long?

  • @Horsehater500
    @Horsehater500 Před 2 měsíci +1

    This works sort of perfectly for me! Only issue is that it covers up the entire sprite? Not sure how to fix that

    • @DashNothing
      @DashNothing  Před 2 měsíci +1

      The text box covers the sprite? You can set a greater position.y offset in the show_textbox function. I put -24 because it worked for my sprite, but feel free to adjust that.

    • @Horsehater500
      @Horsehater500 Před 2 měsíci

      @@DashNothingOH Thank you! I don't know why ididnt think of that lol

  • @RoadSquid
    @RoadSquid Před 8 měsíci

    I get an error on the sprite.flip_h line at the end that says “expected else after ternary operator condition

    • @DashNothing
      @DashNothing  Před 8 měsíci

      Yeah, that line is cut off in the video because it uses stuff like interaction_area which wasn't covered in the video and might not work for you.
      But the error happens because when you use a ternary operator you have to write it as "if ... else ..." all in one line.

  • @ddmp_er
    @ddmp_er Před 9 měsíci +2

    thx for tutorial! i used this in godot 3.5 but i have some questions
    in code u use "await resized" in margin container but godot 3.5 don't have this method. what i can do?

    • @DashNothing
      @DashNothing  Před 9 měsíci +2

      You can use yield(self, "resized") and it will work exactly the same. Hope that helps!

    • @ddmp_er
      @ddmp_er Před 9 měsíci

      thanks! it's work@@DashNothing

    • @mgomezmunoz92
      @mgomezmunoz92 Před 7 měsíci

      @@DashNothing I am using godot 3.5 and "custom_minimum_size" is not recognized, any idea?

    • @DashNothing
      @DashNothing  Před 7 měsíci

      @@mgomezmunoz92 I think you can use rect_min_size

  • @trenom
    @trenom Před 8 měsíci +2

    what is the equivalent of the await keyword in godot 3.5? is it "yield()" ?

  • @JackDaloots
    @JackDaloots Před 8 měsíci

    Nice nostalgia from the water level of Mario 64 :D

  • @godotology
    @godotology Před 8 měsíci +4

    Very very good tutorial . Your work is next level .
    Can you make tutorial about scroll container in godot 4 ??

    • @DashNothing
      @DashNothing  Před 8 měsíci +3

      Thank you. You can see a use of scroll contaimer in my newest video about keybinding, where we use it to get a scrollable list of buttons. Is there anything specific about it that you would like to see?

  • @floranstarbound9308
    @floranstarbound9308 Před 10 měsíci +1

    At the end, you show a script of how to have a reference to DialogManager. But I don't know how to do the @onready for DialogManager correctly. How did you write it?

    • @DashNothing
      @DashNothing  Před 10 měsíci +2

      In the beginning I went to Project settings -> Autoload and loaded the DialogManager.gd script.
      This makes it available in all scripts in your project, so you don't need to load it with @onready, just call DialogManager from anywhere. You'll know you set it up correctly if Godot gives you autocomplete suggestion for DialogManager when you start typing.
      Hope that helps!

    • @DashNothing
      @DashNothing  Před 10 měsíci +2

      @@vindhyaganti9738 You can see the whole DialogManager script in the video. My commenz above didn't include a link, but CZcams recognized the words DialogManager(dot)gd as one. Sorry for the confusion :)

    • @vindhyaganti9738
      @vindhyaganti9738 Před 10 měsíci +2

      @@DashNothing Thank you so much! Just finished the tutorial, but when I try to add the "DialogManager.start_dialog(global_position, lines)" to my player script, I get the error that "lines" is not declared in the current scope. How do I resolve this?

    • @DashNothing
      @DashNothing  Před 10 měsíci +1

      @@vindhyaganti9738 Make sure your var lines is declared at the top of the script, along with your other variables. This way all functions will have access to lines. If you declared lines inside a function, other functions will not be able to use it

  • @bellehuberty9457
    @bellehuberty9457 Před 28 dny

    Thank you so much for the free tutorial! Incredibly useful and easy to follow. Do you or anyone else in the comments have any advice on how we should add the dialogue to objects/scenes in our game? That part was glossed over a bit and I'm a noob who would like more information. Thank you!

    • @DashNothing
      @DashNothing  Před 27 dny +1

      I used this dialog system in my interaction tutorial. Cgeck it out: czcams.com/video/ajCraxGAeYU/video.htmlsi=7se_B4-1Hp8oDC06

    • @bellehuberty9457
      @bellehuberty9457 Před 27 dny

      @@DashNothing awesome, thank you again!!

  • @lucaortolani6907
    @lucaortolani6907 Před 3 měsíci +1

    Hi! Thanks for the tutorial!
    I get an error at runtime on the text_box script at line 23:
    label.text = text_to_display
    "invalid set index 'text' (on base: 'nil') with value of type 'String'"
    You know what the cause might be? Thanks

    • @DashNothing
      @DashNothing  Před 3 měsíci +1

      Thanks!
      The error means that the label var is null. Check if you get the label correctly on the @onready var line. Either the path to the label or the label node name is wrong.

    • @lucaortolani6907
      @lucaortolani6907 Před 3 měsíci +2

      Thanks for the reply. The problem was I was starting the conversation calling the dialogueManager from the _ready() function of a npc i created...@@DashNothing

    • @braxtonsdev9564
      @braxtonsdev9564 Před 2 měsíci +1

      @@lucaortolani6907 had the same issue, thx for replying with fix

  • @GreedFeed
    @GreedFeed Před 4 měsíci +1

    I’m confused. Where is that resized signal coming from?

  • @WinterManPlay
    @WinterManPlay Před 11 dny

    Hi, a very cool video. only one thing I didn't understand is how to make the interact button appear when approaching a character? I don't understand where it is located in the code. and is there any other way to make the main character unable to move during the dialogue? so that he just stood in place, and at the end of the dialogue, the control appeared again?

    • @mimivrc4148
      @mimivrc4148 Před 11 dny

      it's a different video czcams.com/video/ajCraxGAeYU/video.html

    • @DashNothing
      @DashNothing  Před 11 dny +1

      The interaction is from this video: czcams.com/video/ajCraxGAeYU/video.htmlsi=payF90S3z1uuS9xS
      And stopping the player is in the textbox followup: czcams.com/video/QvkGnDNbLaQ/video.htmlsi=izBc9pxv88t2qBEw

    • @WinterManPlay
      @WinterManPlay Před 11 dny

      @@DashNothing спасибо, обязательно попробую 👍

  • @Zap-Plays
    @Zap-Plays Před 6 měsíci

    Another excellent tutorial.
    I am unfortunately running into an issue. I'm not getting any errors, but when I go up to the npc character and press [E] to interact... Nothing happens. I fixed all the errors I was getting with the other tutorial, and I don't see any differences in code with this tutorial and my own. Is there something I'm missing? If you could help, that be greatly appreciated.

    • @DashNothing
      @DashNothing  Před 5 měsíci +1

      With the interaction system from the other video you should be able to just call DialogManager.start_dialog() in the object you want to interact with. Like it was shown at the end of that video.
      You can add a print() at the beginning of your npc's interact function and see if the gsme even gets to that point.

    • @Zap-Plays
      @Zap-Plays Před 5 měsíci +1

      @@DashNothing @DashNothing DialogManager.start_dialog() is being called in my npc's script, but as I implemented the print() to my npc's interact func, it appears nothing is happening.
      I'm going to try again from scratch on a new file, because I honestly don't know why the text box isn't showing up above my npc when they're at least flip_h when I interact from both sides.

  • @pietrobouery8180
    @pietrobouery8180 Před měsícem

    how to make it keep looping a text like some sort of radio, should i make an infinite loop inside the code or is there any other possible way.
    Also Great tutorial ,but since im new i wished you could show the full code at the end for the person to interact with.

    • @DashNothing
      @DashNothing  Před měsícem +1

      You wouldn't make an infinite loop, but you could have a timer and show a new line when it times out. You would have to watch out for the line index not to go over the size of the lines array, as that would lead to an error. That's easy enough, as you just have to reset it back to 0 when it reaches the final line.
      Here's the interaction tutorial that works hand in hand with this dialog system: czcams.com/video/ajCraxGAeYU/video.htmlsi=Sz6PHsFqGmh9wjcd

    • @pietrobouery8180
      @pietrobouery8180 Před měsícem

      @@DashNothing tysm for replying , ur the best

  • @bananalips279
    @bananalips279 Před 3 měsíci

    at the line 29 for the dialogue manager script it tells me that instantiate is not a function in godot how do you fix it?

    • @DashNothing
      @DashNothing  Před 3 měsíci +1

      If you're using Godot 3 the function is called instance()

  • @aidenquinn3329
    @aidenquinn3329 Před měsícem

    Awesome tutorial but I have a question. I did type in both the codes being the textbox and the dialogue manager but now I'm stuck. I know you made a practice dude to print it out but I'm trying to make it so that the textbox immediately starts when the level loads so I tried to do a "func _ready():" but after that I'm completely lost. I placed the code in the textbox itself as well and that also doesn't seem to work.

    • @DashNothing
      @DashNothing  Před měsícem

      Don't change the textbox or the dialog manager scripts - they work as is. Make a new scene that you want to be "talking" at the start of the game, define some lines in its script, and in the _ready() func call DialogManager.start_dialog, as shown for the NPC example in the video.

    • @aidenquinn3329
      @aidenquinn3329 Před měsícem +1

      Thanks man, definitely deserving of a sub dude.

    • @aidenquinn3329
      @aidenquinn3329 Před měsícem

      @@DashNothing Ok I set it up in a different project, did everything in the video and here's the thing. I have a character2d which has some vanilla movement code with the "const lines: Array[String] = ["hey wanna spar",]" at the top and the "func _ready():" beneath with the only line of code being "DialogManager.start_dialog" but its still not doing anything. am I supposed to place the textbox in the world itself because when I do that I get the box but no text. sorry if this is a hassle to read through because I've tried everything to get it to work and nothing has shown me progress yet.

  • @Cool_Kid95
    @Cool_Kid95 Před 11 měsíci +21

    Godot?! LIKE ACE ATTORNEY?!

    • @DashNothing
      @DashNothing  Před 11 měsíci +8

      Not quite haha

    • @turquoiseninju7
      @turquoiseninju7 Před 6 měsíci +2

      Heh, even I was thinking of him when I first heard of Godot.. turns out the creators named the program kind of as a reference to him

    • @fu_games
      @fu_games Před měsícem

      could you explain it to someone who never played ace attorney? what is the reference here?

  • @tomnom
    @tomnom Před měsícem +1

    10:35 For me, after the last line of dialog, the text box doesnt dissapear and just starts over right again. How can i make it dissapear after using it?

    • @DashNothing
      @DashNothing  Před měsícem +1

      You probably have the same key to start and advance the dialog, so right after it gets dismissed it gets triggered again. You can call accept_event() at the end of the input function in the DialogManager to stop the event propagating further.

    • @tomnom
      @tomnom Před měsícem

      @@DashNothing wow such a fast response! Thank you for your awesome tutorials and dedication!

  • @Mazzolli
    @Mazzolli Před 7 měsíci

    Very informative video! Thank you! I haven't managed to make it fully work yet... Could you tell me what's the code at the very top if test_guy´s script?

    • @DashNothing
      @DashNothing  Před 7 měsíci +1

      There's an @onready var sprite = $AnimatedSprite2D to do the turning toward the player and @onready var speech_sound = preload(...) that preloads the short sound that is the last parameter of DialogManager.start_dialog()

    • @Mazzolli
      @Mazzolli Před 7 měsíci

      @@DashNothing I think it´s fixed now: The dialog box was being shown all at once, in the wrong place, and it didn´t advance... But removing the "await resized" in line 25 fixed all of that! I'm not sure why xD

  • @user-de9fj1gu2k
    @user-de9fj1gu2k Před 3 měsíci +1

    hello thank you so much for your video but the problem now is how to make that text shown up when i interact with characters i am still a beginner and i don't know how to do that

    • @DashNothing
      @DashNothing  Před 3 měsíci +2

      I got a video for that too: czcams.com/video/ajCraxGAeYU/video.htmlsi=gaVv8iO0qUEoLaLk

    • @user-de9fj1gu2k
      @user-de9fj1gu2k Před 3 měsíci +1

      @@DashNothing thank you so much

  • @falkherbig4394
    @falkherbig4394 Před 5 měsíci

    Everything works great, but when I interact, the dialog box spawns at the origin of the scene. It doesn't seem the give the global position. This is the code:
    extends Sprite2D
    const lines: Array[String] = [
    "Hello World",
    "This is a test"
    ]
    func _process(delta):
    if Input.is_action_just_pressed("advance_dialog"):
    DialogueManager.start_dialog(global_position, lines)

    • @DashNothing
      @DashNothing  Před 5 měsíci

      In a line before DialogManager.start_dialog(...) can you write print(global_position) and in the output see if the position is correct. It should be something other than 0, 0.
      If that is correct, the problem is probably within the dialog manager's start_dialog function where it sets the textbox's position.

    • @falkherbig4394
      @falkherbig4394 Před 5 měsíci +1

      @@DashNothingOh, man. I am so stupid. I just forgot the line during 9:19 ...
      Thanks for the quick help👍 earned a sub

  • @starstriker4960
    @starstriker4960 Před 6 měsíci

    Hello, where is InteractionLabel initialized? I was trying to follow this but cannot find that anywhere

    • @DashNothing
      @DashNothing  Před 6 měsíci

      It wasn't covered in the video, but it's an autoloaded scene with just a label with methods for showing and hiding. If you wanna learn more, a much better interaction system including an interaction label is covered in this video czcams.com/video/ajCraxGAeYU/video.htmlsi=lx_pFQT755mDVp7m

    • @starstriker4960
      @starstriker4960 Před 6 měsíci

      @@DashNothing see I do watch both and followed it, right now going inside the area will cause an error on area1 global position and crash the game. Other issue I was having was the label would never hide. Was a great video and removing the area stuff let’s it work, but that has the issue of you can press e to interact no matter the distance, and it will still not hide

  • @justrosy5
    @justrosy5 Před 2 měsíci

    What painting program did you use to create the sprite?

  • @lPandoraBox
    @lPandoraBox Před 3 měsíci

    Hello, so I have been messing around with ur script for a few days, and I have a question: Do u have any idea how I could make a animation on resize? I have no idea how to do it, already tried a lot of things, none of them seem to work...
    If possible I would like to contact u trough discord.

    • @DashNothing
      @DashNothing  Před 3 měsíci

      I don't have a discord yet, but a popup animation for the text box is one of the things shown in the follow up video here: czcams.com/video/QvkGnDNbLaQ/video.htmlsi=JBMBSTvq2bDy8vsW

    • @lPandoraBox
      @lPandoraBox Před 3 měsíci

      @@DashNothing I know how to make a popup animation, my issue is: Imagine that one npc have 2 lines of a dialogue, right? When I want to change from one to another, I dont want to make another popup instead, I want to resize with an animation the current bubble

    • @lPandoraBox
      @lPandoraBox Před 3 měsíci

      @@DashNothing and ty for the answer btw

  • @danbryandalisay8547
    @danbryandalisay8547 Před 6 měsíci

    My solo npc dialogue its working fine but when i add another npc, both of them the dialogue are not working and not showing like pop up then disappear immediately 😞
    Sorry my for grammar 😅

    • @DashNothing
      @DashNothing  Před 6 měsíci +2

      This happens because there is no check to see which npc is closer to the player before starting the dialogue, so both start it at the same time. You need to implement some sort of interaction system to handle interactions by distance to the player. Or you can check out my interaction system which works well with this dialogue system here czcams.com/video/ajCraxGAeYU/video.htmlsi=uiRgGisX6dkcqGpr

  • @rebelape4257
    @rebelape4257 Před 5 měsíci

    func _display_letter (): is giving me a "Standalone lambdas cannot be accessed. Consider assigning it to a variable." error

    • @DashNothing
      @DashNothing  Před 5 měsíci

      Sounds like you're missing the keyword func in front of the _display_letter function to me

  • @greasykiwi2935
    @greasykiwi2935 Před 4 měsíci

    Is there any way to have the text box move with the character?

    • @DashNothing
      @DashNothing  Před 4 měsíci

      Maybe you could make the text box a child of the scene that it's triggered over. This would be done in the dialogue manager every time you create a new text box.

  • @pietrobouery8180
    @pietrobouery8180 Před měsícem

    the InteractionLabel is undefined , i couldnt find where did u write it before in the 2 videos, please help me xD

    • @DashNothing
      @DashNothing  Před měsícem +1

      This was written only to demonstrate the text box and is not explained, as that's outside of the scope of the video. I remade and improved the interaction system in this video: czcams.com/video/ajCraxGAeYU/video.html

    • @pietrobouery8180
      @pietrobouery8180 Před měsícem

      @@DashNothing oh alright , thank you so much

  • @MistForgeStudios
    @MistForgeStudios Před 7 dny

    Hello! really enjoyed the videos for the dialog and interact systems! I am running into an issue though. I have a test guy to interact with, he has line size of 4, and after i talk to him, after the second time I advance_dialog, it breaks and wont let me continue. I am not sure why this is happening. my dialog_lines.size() is 4 and my current line index is 2 when it happens. Also the text box changes location after I advance after the second box. Super confused and unsure on why this is happening and the solution. Been going through all the videos in regards to the dialog system and can't seem to find a solution to this... Any help would be awesome!

    • @DashNothing
      @DashNothing  Před 7 dny

      How long is the third line, then one that doesn't get displayed? There is a problem with short lines because the two resized signals of the textbox don't get called.

    • @MistForgeStudios
      @MistForgeStudios Před 7 dny

      @@DashNothing third line is longer than the second line, the third textbox does show up but bugs out and changes location of previous textbox. But then I am unable to continue.

    • @DashNothing
      @DashNothing  Před 7 dny

      @@MistForgeStudios I haven't encountered that so far. Are there any special characters in the third one? What if you switch the third and second line? Does it get displayed then?

    • @MistForgeStudios
      @MistForgeStudios Před 7 dny

      ​@@DashNothing Out of some strange trial and error, I commented out the line 25 - await resized, and now it works. I have no idea why that would make it work or why that would cause it to bug out. But yeah. it now works. weird. Also, thank you for the quick responses! :)

  • @tinielcerulis6829
    @tinielcerulis6829 Před 2 měsíci

    How can the NinePatchRect be auto resized according to the label text content? I don't see anything you do which can enable that and on my side, it doesn't do that.

    • @DashNothing
      @DashNothing  Před 2 měsíci

      The part at 1:30 sets it up so it tiles nicely when its size changes.

    • @tinielcerulis6829
      @tinielcerulis6829 Před 2 měsíci

      @@DashNothing I'm not talking about how it resizes in itself, but how it's changing while you're changing the label text in the editor ? My label just go over the texture as it wasn't contained or what.

    • @tinielcerulis6829
      @tinielcerulis6829 Před 2 měsíci

      Maybe the video is using Godot 3 ? And some behaviors changed with Godot 4 ? Anyway got it working with a PanelContainer and StyleboxTexture which is the same and it resizes with the label accordingly.

    • @tinielcerulis6829
      @tinielcerulis6829 Před 2 měsíci +1

      Ok I got it when I saw at 3 min your gd script, the Textbox is a MarginContainer itself, that's why ^^ i got a little too fast in the first minute of the video!

  • @hackdotslash
    @hackdotslash Před 21 dnem

    Any idea why my text box doesn't seem to show up? Godot says it's created in the remote view, but I have no idea where it is haha

    • @DashNothing
      @DashNothing  Před 21 dnem +1

      You can also check its position and size in the remlte view's inspector. That will tell you more about what happened.

  • @PikaWarrior1222
    @PikaWarrior1222 Před 4 měsíci

    This is a great tutorial, but there's one small issue though. Whenever I try to make the dialogue happen it stops at the first letter. Is there a way to fix that?

    • @DashNothing
      @DashNothing  Před 4 měsíci

      Sounds like there's an issue with the timer. Are you calling timer.start() and did you connect the timer's timeout signal?

    • @PikaWarrior1222
      @PikaWarrior1222 Před 4 měsíci

      @@DashNothing yes, but it still only displays one letter.

  • @lambilla14
    @lambilla14 Před 8 měsíci +1

    So cool video! But it dont work in my project, it doesnt give me an error it just appear the first thext and then stop working.

    • @DashNothing
      @DashNothing  Před 8 měsíci +1

      Shame you couldn't make it work, but I'm glad you enjoyed the vid

  • @smillbag97
    @smillbag97 Před 3 měsíci +1

    Great tutorial. Thank you for all the help!
    One problem I ran into is continuing to the next line of dialogue. My NPC just sits there on the first line of dialogue and doesn't continue. 😢 E to interact works and the label disappears, I just cant di anything for that point on

    • @DashNothing
      @DashNothing  Před 3 měsíci +1

      I'm not sure I understamd the problem. Does the first line text disappear, but the next one doesn't appear? What about the textbox? Can you make sure your current_line_index gets incremented by writing some print statements?

    • @smillbag97
      @smillbag97 Před 3 měsíci

      @DashNothing the textbox and the first line of dialogue appear. However, the subsequent lines do not appear and the textbox is stuck above the NPC with the first line of dialogue. I will check the current_line-index tomorrow night and get back to you!

    • @zavtronesegodnya
      @zavtronesegodnya Před 3 měsíci

      How can I make a dialogue appear when I interact with an NPC?

  • @sabajoglidze9823
    @sabajoglidze9823 Před měsícem +2

    great tutorial but i have problem when i call functon game crashes so i cant even see whats the problem any idea what could cause it?

    • @DashNothing
      @DashNothing  Před měsícem

      You get an error in the debugger window at the bottom center of Godot when a crash happens. You will see what caused it in red text.

    • @sabajoglidze9823
      @sabajoglidze9823 Před měsícem

      @@DashNothing godot crushes with game

    • @DashNothing
      @DashNothing  Před měsícem

      @@sabajoglidze9823 Oh that is not normal. Best you can do is report an issue on Github.

  • @stormm69
    @stormm69 Před 5 měsíci

    First of, really cool and well made tutorial, earned a sub.
    Though im having some trouble with it. Sometimes the next dialog box that's supposed to come just doesn't show up at all when i advance dialog, it seems to be dependent of the lines and the MAX_WIDTH variables, for example i might have three sentences in my lines parameter, then the first two works like a charm, but when i advance_dialog, the third line might just never show up, but if i then change the text sometimes it works, and also if i change the MAX_WIDTH one line might work but others ceases to work, and i haven't quite figured out the correlation.
    Ive then tried debuggin the code by putting print("something") into it, and i discovered that when i try to show the textboxes that doesn't work, it doesn't seem to get past the two "await resized"'s in the code. Like if i put print("something") in front of them it prints, but if i put it right behind it doesn't. Still i cant seem to figure out what exactly is causing my problem. Any help would be GREATLY appreciated.
    Heres the code as i have written it(including the speech sfx's of your other video):
    --------------------------------------------------------------------------------------------------------------------------------
    extends MarginContainer
    @onready var label = $MarginContainer/Label
    @onready var timer = $LetterDisplayTimer
    @onready var audio_player = $AudioStreamPlayer
    const MAX_WIDTH = 160
    var text = ""
    var letter_index = 0
    var letter_time = 0.045
    var space_time = 0.06
    var punctuation_time = 0.2
    signal finished_displaying()
    func _ready():
    scale = Vector2.ZERO
    func display_text(text_to_display: String, speech_sfx: AudioStream):
    text = text_to_display
    label.text = text_to_display
    audio_player.stream = speech_sfx
    await resized
    custom_minimum_size.x = min(size.x, MAX_WIDTH)
    if size.x > MAX_WIDTH:
    label.autowrap_mode = TextServer.AUTOWRAP_WORD
    await resized # wait for x resize
    await resized # wait for y resize
    custom_minimum_size.y = size.y
    global_position.x -= size.x / 2
    global_position.y -= size.y + 24
    label.text = ""
    pivot_offset = Vector2(size.x / 2, size.y)
    var tween = get_tree().create_tween()
    tween.tween_property(
    self, "scale", Vector2(1, 1), 0.15
    ).set_trans(
    Tween.TRANS_BACK
    )
    _display_letter()
    func _display_letter():
    label.text += text[letter_index]
    letter_index += 1
    if letter_index >= text.length():
    finished_displaying.emit()
    return
    match text[letter_index]:
    "!", ".", ",", "?":
    timer.start(punctuation_time)
    " ":
    timer.start(space_time)
    _:
    timer.start(letter_time)
    var new_audio_player = audio_player.duplicate()
    new_audio_player.pitch_scale += randf_range(-0.05, 0.05)
    if text[letter_index] in ["a", "e", "i", "o", "u"]:
    new_audio_player.pitch_scale += 0.1
    get_tree().root.add_child(new_audio_player)
    new_audio_player.play()
    await new_audio_player.finished
    new_audio_player.queue_free()
    func _on_letter_display_timer_timeout():
    _display_letter()
    -------------------------------------------------------------------------------------------------------------------------------
    extends Node
    @onready var text_box_scene = preload("res://scenes/text_box.tscn")
    var dialog_lines: Array[String] = []
    var current_line_index = 0
    var text_box
    var text_box_position: Vector2
    var sfx: AudioStream
    var is_dialog_active = false
    var can_advance_line = false
    func _process(_delta: float) -> void:
    pass
    func start_dialog(position: Vector2, lines: Array[String], speech_sfx: AudioStream):
    if is_dialog_active:
    return
    dialog_lines = lines
    text_box_position = position
    sfx = speech_sfx
    _show_text_box()
    is_dialog_active = true
    func end_dialog():
    if is_dialog_active == true:
    text_box.queue_free()
    is_dialog_active = false
    current_line_index = 0
    func _show_text_box():
    text_box = text_box_scene.instantiate()
    text_box.finished_displaying.connect(_on_text_box_finished_displaying)
    get_tree().root.add_child(text_box)
    text_box.global_position = text_box_position
    text_box.display_text(dialog_lines[current_line_index], sfx)
    can_advance_line = false
    func _on_text_box_finished_displaying():
    can_advance_line = true
    func _unhandled_input(event):
    if (
    event.is_action_pressed("advance_dialog") &&
    is_dialog_active &&
    can_advance_line
    ):
    text_box.queue_free()
    current_line_index += 1
    if current_line_index >= dialog_lines.size():
    is_dialog_active = false
    current_line_index = 0
    return
    _show_text_box()

    • @guurff9581
      @guurff9581 Před 3 měsíci

      having this exact same problem and still havent found a fix. It looks like the the await x resize runs find as you can put a print between the two and it works but anything after the second await doesnt run at all

  • @devon674
    @devon674 Před 6 měsíci +4

    so totally just let this minutiae consume my entire evening but if anyone else is confused by this, I thought for a very long time my NinePatchRect texture wasn't working properly, and spent a ton of time trying to fix a problem that wasn't there: what I was doing was using the scale mode tool, instead of using select mode to click and dragon the corner of the Textbox margin container. if this saves everyone, don't be like me. if you use the scale mode tool, it makes it look like the NinePatchRect is refusing to tile and scaling instead and looks like shit. I had to finally stop the video at the exact right instant and actually LOOK at what mode the editor was in.
    anyway um, I will continue with the tutorial now haha.

    • @DashNothing
      @DashNothing  Před 6 měsíci +1

      Oof I know that feeling

    • @willd2609
      @willd2609 Před 5 dny

      yeah i have spent an hour just trying to figure out why mine isn't working. Would love to see the source code for this project DashNothing!

  • @jasonozolins8781
    @jasonozolins8781 Před 3 měsíci

    When I go to test it I keep getting the error "Invalid get index '47' (on base:'String')", not sure where I went wrong. Any help would be appreciated. I checked timer to make sure it was set to one shot, and the code was written correctly (I think) as suggested to someone else experiencing this issue. However, it is still crashing with that error message.

    • @DashNothing
      @DashNothing  Před 3 měsíci

      Well it seems that your line has 47 characters, and the code tries to get the 48th character which doesn't exist. Func _display_letter() increases this index, and it should never reach a value larger than the string length because of the if letter_index >= text.length(), which is followed by a return statement. Can you post this part of your code here?

    • @jasonozolins8781
      @jasonozolins8781 Před 3 měsíci

      @@DashNothing
      func _display_letter():
      label.text += text[letter_index]
      letter_index += 1
      if letter_index >= text.length():
      finished_displaying.emit()

    • @DashNothing
      @DashNothing  Před 3 měsíci +1

      @@jasonozolins8781 So you're missing a return after finished_displaying.emit(). Check the vid at 6:12

    • @jasonozolins8781
      @jasonozolins8781 Před 3 měsíci +1

      @@DashNothing Thanks so much! That fixed it. I appreciate the help.

  • @MochiRosu
    @MochiRosu Před dnem

    Good Day to you Sir. Just wondering, if someone wanted to add a dialog system to the game, could they not just use the Dialogic add on?

    • @DashNothing
      @DashNothing  Před dnem +1

      Of course. I don't know how flexible Dialogic is when it comes to UI though - that is to say does it support text bubbles rather than fixed text boxes.
      But this is a relatively simple solution for games where you need a simple dialog system.

    • @MochiRosu
      @MochiRosu Před dnem

      @@DashNothing Thank you

  • @braxtonsdev9564
    @braxtonsdev9564 Před 2 měsíci

    When I’ve reached the end of my dialogue the popup doesn’t go away. Any advice?

    • @braxtonsdev9564
      @braxtonsdev9564 Před 2 měsíci

      The text also appears without any wait time at all

    • @DashNothing
      @DashNothing  Před 2 měsíci

      @@braxtonsdev9564 Did you set your timer to one shot?

  • @kacpereee8181
    @kacpereee8181 Před měsícem

    Hello, love the tutorials. I get en error on line 20 on textbox file. "Invalid set index 'text' (on base: 'Nil') with value of type 'String'.". I type everything as in video but it seems that when I use label.text I get nothing.
    The label var is set as @onready so there shouldnt be a problem

    • @DashNothing
      @DashNothing  Před měsícem +1

      Make sure that the path to the label after $ in the @onready line is correct. Seems like Godot couldn't find your label at the path you provided and instead returns null.

    • @kacpereee8181
      @kacpereee8181 Před měsícem

      @@DashNothing Yes, I tripple checked that in the first place. I even right clicked on the Label and copied its path to ensure that I don't make any typos. :/ Thats why I wrote the comment

    • @DashNothing
      @DashNothing  Před měsícem

      @@kacpereee8181 You can check what's stored in var label by writing print(label) in the _ready() func to see if it was fetched. If it is in there, but it's null when you try to assign text, it could be that the variable is changed somewhere in the code.

  • @DRUYD
    @DRUYD Před 5 měsíci +5

    Great video, thanks!
    I had one small issue though, if the text is very short (less than 5 characters), it seems like the first "await resize" doesn't behave as I'd expect, I can't explain why, but it causes the text box to never go away. I fixed it by setting a min length to run that first resize
    if (text.length() > MIN_WIDTH):
    await resized
    If anyone knows of a better approach or can explain why this happens I'd be really happy to understand this better.

    • @user-ih3jm1dk7d
      @user-ih3jm1dk7d Před 4 měsíci +1

      bro can you tell me your MIN_WIDTH value? i also meet this problem, i want to fix it

    • @DRUYD
      @DRUYD Před 4 měsíci

      ​ @user-ih3jm1dk7d sure, I've set it to 5 and that seems to work for me. I don't fully understand the details of it though so you might need a different value. I hope it helps.
      edit: to clarify, MIN_WIDTH is not a great name for it, as it is minimum text length really. I've set it to 5, as in 5 characters.
      So, if the text is longer than 5 characters, then it does the "await resized", otherwise it skips it. I'm still unaware of the larger implications of this or the underlying reason, but so far I haven't had any issues. If you gain some insight let me know as I'm interested :)

    • @Yoh44Rus
      @Yoh44Rus Před 4 měsíci +1

      Problem is in "await resized", because "resized" is a signal. And for example, if you have margin container, that is bigger than whats inside of it, it doesnt emit a signal and code doesn't go any further

    • @DRUYD
      @DRUYD Před 4 měsíci

      @@Yoh44Rus that makes a lot of sense, I'll check this when I go back to my project and see how to clean it up so this behaviour is clearer.
      Thanks!

    • @Tech-ib6wg
      @Tech-ib6wg Před 3 měsíci

      I had the same issue. Regardless of the min width, this will also happen if two consecutive lines of text are the exact same length (same character count). I solved it by only awaiting when the dialog_lines[current_line_index].length() is different from the previous length (current_line_index - 1). Although this would not catch the scenario some of you described where the the text is less than the min width.

  • @legoreptyle1048
    @legoreptyle1048 Před 2 měsíci

    Hello! I'm trying to make your dialogue but when I start it, the only letter that display is the first one. I typed "text" and it wrote "t". Can someone help me pls?

    • @DashNothing
      @DashNothing  Před 2 měsíci

      Is the timer getting set after every letter? Its timeout callback is what makes new letters appear.

    • @legoreptyle1048
      @legoreptyle1048 Před 2 měsíci

      @@DashNothing I fixed it but if I press space after the end of the dialogue it keeps looping. Why?

    • @DashNothing
      @DashNothing  Před 2 měsíci

      @@legoreptyle1048 It could be because the same key is for starting a dialog and advancing lines. In the dialog manager you can call accept_ecent in dialog manager's _input() function to eat the input. Let me know if this helps.

  • @LMach1
    @LMach1 Před 8 hodinami

    Using Godot 4.2 I got this working. Very fun way of typing out text. However, I was hoping to add in a RichTextLabel to use BBCode. I tried a few things with mixed results. The best I could do is have a ColorRect over the label and the RichLabel on top. Does anyone know what would a good way to make RichLabelText work?

    • @DashNothing
      @DashNothing  Před 5 hodinami +1

      I actually did figure out how to adapt the rich text label into this over on my discord. It's actually pretty simple. If you're interested join and shoot me a message and I'll point you to it.

  • @dinox8vc46
    @dinox8vc46 Před 9 měsíci +1

    why cant I find TextBox but only TextEdit and it doesnt work if i use TextEdit

    • @DashNothing
      @DashNothing  Před 9 měsíci +1

      TextBox isn't a node right out of the box in Godot, instead you can use a Label node with a NinePatchRect node to make your own text box, just like in the video :)

    • @dinox8vc46
      @dinox8vc46 Před 9 měsíci

      Thanks now it works, great tutorial!@@DashNothing

  • @bluestarkinreddit4180
    @bluestarkinreddit4180 Před 6 měsíci

    I have done the tutorial several times, but I can never see the text box when I interact with my test_guy, any advice?

    • @DashNothing
      @DashNothing  Před 6 měsíci

      Check if the function for starting dialog even gets called by putting a print() statement in it.
      If that's okay, check if the textbox scene is visible in the visibility section of the inspector.
      Some people had issues with double await resized, so try removing one await resized and see what happens.
      Hope that helps!

    • @bluestarkinreddit4180
      @bluestarkinreddit4180 Před 6 měsíci

      @@DashNothing I correctly called the start_dialog function, verified that the scene was visible and also tried eliminating some waits, but still nothing was displayed.

    • @Zap-Plays
      @Zap-Plays Před 6 měsíci

      Any update? Having the same issue.@@bluestarkinreddit4180

  • @willd2609
    @willd2609 Před 5 dny

    please please please post the source code for this. I have tried to follow the instructions pausing the video every few seconds and i can't get the dialog box to display correctly. I am sure it's one little checkbox somewhere but I can't see where.

  • @diegoandradex12
    @diegoandradex12 Před 8 měsíci

    Could you tell the rest of the code at 10:46 after line 30?

    • @DashNothing
      @DashNothing  Před 8 měsíci

      That was the old way of hiding the interaction label, so if you followed my interaction video you don't want that line, nor the function above it.
      But it was this:
      InteractionLabel.hide_label()

  • @TheTrueUnknownCoder
    @TheTrueUnknownCoder Před 5 měsíci +1

    Great tutoriel! I haven't managed to make it work, evry time I run my code this error pops up:Invalid set index 'text' (on base: 'Nil') with value of type 'String'.
    Does anyone know how to fix this?

    • @DashNothing
      @DashNothing  Před 5 měsíci

      Seems like you don't have a reference to the label when you try to set its text. You should get the label at the top of the script with @onready. Make sure the name is correct, as it is in the scene tree (in case you renamed it).

    • @TheTrueUnknownCoder
      @TheTrueUnknownCoder Před 5 měsíci

      @@DashNothing I checked but still (also thanks for the quik answer)

  • @Hello-zd3dg
    @Hello-zd3dg Před 7 měsíci

    Thanks a bunch for the tutorial! However, I have a bit of an issue because I am new to this. The first await resized does not trigger when the first line of dialogue is shown, and as a result the lines are shown instantly. Is there a possible solution for this?

    • @DashNothing
      @DashNothing  Před 7 měsíci

      Maybe its not a problem with the resized signal. Are you sure you delete the text at the end of size calculations? label.text = ""

  • @1r1sh50
    @1r1sh50 Před 3 měsíci

    Could you help me out with something? I did both of your tutorials and it's pretty much working,.the only thing is it only displays the first line of dialogue, then if I click advance it just restarts the first line displaying

    • @DashNothing
      @DashNothing  Před 3 měsíci

      Could it be that you don't increment the current line index (at 10:10)?

    • @1r1sh50
      @1r1sh50 Před 3 měsíci

      I have the increment implemented in the code but it doesn't seem to increment to the next line in my lines array, just stuck restarting

    • @DashNothing
      @DashNothing  Před 3 měsíci

      @@1r1sh50 You can write some print statements to check the value of the current_line_index periodically, and see if it matches up. You can do the same to check which line is currently showing. Thrn you can figure out what's out of place.

    • @1r1sh50
      @1r1sh50 Před 3 měsíci

      @@DashNothing i tried doing trhat and it seems the unhandles input in the dialogue manager is never being called. i am using godot 4, and so insterad of event.is_action_pressded... i changed to Input.is_action_pressed, and still it wont change to the next dialogue lines

    • @DashNothing
      @DashNothing  Před 3 měsíci

      @@1r1sh50 The video was made with Godot 4, so I would suggest leaving it at event.is_action_pressed. Maybe you didn't bind a key to the advance_dialog action? Check in project settings -> input map

  • @cmrdgi
    @cmrdgi Před 6 měsíci +1

    Hey! Thanks for the tutorial. I almost got it to work but I am getting the following error after the first line of text is displayed:
    Invalid get index '44' (on base: 'String'). line 44 is : label.text += text[letter_index]. I am a complete beginner at both Godot and programming at large, help would be really appreciated :)

    • @DashNothing
      @DashNothing  Před 6 měsíci +1

      This means your letter_index is somehow becoming larger than the number of letters in the text, which shouldn't happen. Is this error happening at the end of displaying the first textbox or after you press the advance dialog button to go onto the next textbox?
      Check 2 lines down from where the error happens (if letter_index >= text.length()). Make sure you wrote >= and not >.
      Hope this helps!

    • @cmrdgi
      @cmrdgi Před 6 měsíci

      @@DashNothing ( if letter_index >= text.length(): ) is written properly, and the error is happening at the end of the first textbox being displayed. I am now somehow also getting an error for the _on_letter_display_timer_timeout() function at (_display_letter()). I guess this is because it's calling back to the function causing the error..

    • @cmrdgi
      @cmrdgi Před 6 měsíci

      well actually it is now displaying the first letter, then breaking at (_display_letter()) only

    • @DashNothing
      @DashNothing  Před 6 měsíci +1

      @@cmrdgi Check your textbox's timer and make sure oneshot is enabled. Otherwise it will keep timing down and trying to display a letter when it shouldn't.

    • @cmrdgi
      @cmrdgi Před 6 měsíci +1

      @@DashNothing omg, stupid mistake hahaha. Thanks so much for the help! Hope you have a great day :)

  • @MattGoode1
    @MattGoode1 Před 3 měsíci

    two questions:
    1 - you "await" the textbox resizing signal. Without awaiting, is it possible that the resizing process takes longer than a frame and the calculations below it will be incorrect?
    2 - please tell me this isn't your real typing speed because i had to pause this so often to follow along mentally and allow my little fingers to catch up

    • @DashNothing
      @DashNothing  Před 3 měsíci +1

      Without awaiting it is guaranteed that the calculations will be incorrect. The resize happens on the next available frame after changing the position, so we have to await it.
      And no, I speed up the typing so the video isn't unnecessarily tedious lol

    • @MattGoode1
      @MattGoode1 Před 3 měsíci

      @@DashNothing haha i see i see, thank you. this was a great vid.

    • @MattGoode1
      @MattGoode1 Před 2 měsíci

      @@DashNothingOne more question as I've been trying to tweak this. at 0:22 the line "I shouldn't waste my energy before ..." has the word "before" appear on the first line, then moves the word to the second line since it's too long to fit on the first. I would like the word to just appear on the correct line to begin with. I tried adding newline characters
      to where the text should break to a new line, but then the display_text() function breaks when it awaits resizing (lines 30-31 in the video) and I'm not sure why. Any ideas how to make that change work?

  • @brookewarsaba8401
    @brookewarsaba8401 Před 5 měsíci

    Hi, loved the video but i really need some more in depth help on how to interact with a character. If anyone knows please help me

    • @DashNothing
      @DashNothing  Před 5 měsíci

      Thank you. I made an interaction system tutorial that works perfectly with this dialogue system. Check it out: czcams.com/video/ajCraxGAeYU/video.htmlsi=VqlyW3GHRrnYCGjU

  • @TechBoi1115
    @TechBoi1115 Před 6 měsíci

    Hi, How can I start the dialogue without my character interacting with something or someone

    • @DashNothing
      @DashNothing  Před 6 měsíci

      Just call DialogManager.start_dialog from any script at any time

    • @TechBoi1115
      @TechBoi1115 Před 6 měsíci

      @@DashNothing it says "unexpected identifier"

    • @DashNothing
      @DashNothing  Před 6 měsíci

      @@TechBoi1115 Can you post the whkle error message?
      Make sure DialogManager is autoloaded and that you pass in the appropriate paeameters to start_dialog (the lines array and sound effect)

    • @TechBoi1115
      @TechBoi1115 Před 6 měsíci

      @@DashNothing ok

  • @sakthisridhar835
    @sakthisridhar835 Před 6 měsíci +1

    Bro i had problem in show_label is non existence which is in base margine container help me bro to figure it out

    • @DashNothing
      @DashNothing  Před 6 měsíci +1

      Post the error message and I'll try to help out.

    • @sakthisridhar835
      @sakthisridhar835 Před 5 měsíci +2

      @@DashNothing bro thanks but i fix it thanks for replying bro ❤️

  • @jacobbiscuitsuuu
    @jacobbiscuitsuuu Před 4 měsíci

    Hi great tutorial, but im having an issue where if i place another character that just uses the exact same code but with different lines only the first one that i placed will actually let me advance the text, i can press E for each Line like normal but the second guy i interact with him,but only his first dialog option shows up and i cant advance the dialog lines. I would appreciate the help! Thanks! ❤

    • @DashNothing
      @DashNothing  Před 4 měsíci +1

      It's hard to say what the issue might be, but you can see what goes wrong if you add some print() statements into the _unhandled_input() func in the dialog manager and print out the values of can_advance_line and is_dialog_active. Both of those should be true when you expect to advance the dialog, and if they're not you should find out why.

    • @jacobbiscuitsuuu
      @jacobbiscuitsuuu Před 4 měsíci +1

      @@DashNothing so I put the print_debug() into the unhandled_input function and it appeared whenever i pressed E for advance dialog for the first guy but absolutely nothing shows up for the second, guy, also i forgot to mention that the letters in his dialog box dont show up one letter at a time and his dialog box never goes away, making it impossible to interact with other guys. I can't figure it out so some help would be greatly appreciated

    • @jacobbiscuitsuuu
      @jacobbiscuitsuuu Před 4 měsíci

      Also I can interact from anywhere btw how do I fix that too I have no idea, pls help

    • @DashNothing
      @DashNothing  Před 4 měsíci

      @@jacobbiscuitsuuu Is the interaction system you're using from my other tutorial?
      If so, I suggest you go over the InteractionManager part of it again to make sure you got everything right. It might be that interaction areas don't unregister themselves properly, or something to that extent.

    • @jacobbiscuitsuuu
      @jacobbiscuitsuuu Před 4 měsíci +1

      @@DashNothing Since I wrote those replies I ended up figuring it out on my own, it was a problem with apparently there's a like a character limit or something but more like the opposite, I was having him say Hey. That's too little characters so it needs to be 5 or more to work, and the interaction thing was a layering problem

  • @Holkerzu
    @Holkerzu Před 4 měsíci

    Hey idk if you could response fast, but I have an error at the timer part.
    Parser Error: Identifier "timer" not declared in the current scope.
    Please do help, a newbie here. Thanks!

    • @DashNothing
      @DashNothing  Před 3 měsíci

      Did you get the @onready reference to the timer like at 3:20? Also make sure that the scene tree timer's name matches the one on that line after the $ symbol.

    • @Holkerzu
      @Holkerzu Před 3 měsíci

      @@DashNothing THANK YOU! I think I drag and hold ctrl the timer into the script without changing the name. Cheers mate, new subs!

    • @Holkerzu
      @Holkerzu Před 3 měsíci

      @@DashNothing I'm so sorry for bothering you, but after fixing this, i have a new error in which I couldn't figure out how to fix it. Please do let me know how I could improve it.
      Invalid set index 'text' (on base: 'Nil') with value of type 'String'.

    • @DashNothing
      @DashNothing  Před 3 měsíci

      @@Holkerzu This looks like the same problem, but with the label this time. Are the names in your scene tree and the @onready var label line the same?

    • @Holkerzu
      @Holkerzu Před 3 měsíci

      @@DashNothing yep! It is.
      Textbox (margin container)
      - NinePatchRect
      - Margin Container
      - - Label
      - Timer

  • @148mrafiif5
    @148mrafiif5 Před 6 měsíci

    the box is too big for me, when i resize the scale of parent margin container, the text is not on the center. anyone could help?

    • @DashNothing
      @DashNothing  Před 6 měsíci +1

      You can set the anchor point of the parent to be center, then resize by holding the alt key and dragging the dots around it. Idk if you did this, but don't use scale on ui elements to resize them. Scale is good for animations.

    • @148mrafiif5
      @148mrafiif5 Před 6 měsíci +1

      @@DashNothing i just tried it but it dont work or maybe it's just my bad. but i found how to fix it, i scaled it to 0.5, then i edit the global position x from / 2 to /4 in text_box.gd. so the box is smaller now and it's position is still on the center

    • @148mrafiif5
      @148mrafiif5 Před 6 měsíci +1

      @@DashNothing thanks btw for the tutorials. very useful for me 👍👍👍

  • @Byte_Hub
    @Byte_Hub Před 7 měsíci +2

    Didn't work for me, using Godot 3.5 with equivalent methods

  • @zavtronesegodnya
    @zavtronesegodnya Před 3 měsíci

    How can I use the code we wrote with the bot?

    • @DashNothing
      @DashNothing  Před 3 měsíci

      If you're looking for a way to interact with NPCs check out this vid czcams.com/video/ajCraxGAeYU/video.htmlsi=BDVtoKdTnlZS5ptp

    • @zavtronesegodnya
      @zavtronesegodnya Před 3 měsíci

      I want the dialogue to appear when the main character approaches like in the video ​@@DashNothing

    • @zavtronesegodnya
      @zavtronesegodnya Před 3 měsíci

      If I go to the video you posted, will I be able to implement the dialogue? And will I need the code that was written in this video?​@@DashNothing

    • @DashNothing
      @DashNothing  Před 3 měsíci

      @@zavtronesegodnya Yes, you will need the code from here for the dialog, and in the linked video you'll learn hoe to enable the player to interact eith objects based on proximity and after a button press. The interaction system works perfectly with this dialog system.

  • @shanekammerman9583
    @shanekammerman9583 Před 16 dny

    Why is it "global_position.x -= size.x / 2" and not "global_position.x = size.x / 2". I'm not sure I understand why its "-=". Thanks!

    • @DashNothing
      @DashNothing  Před 15 dny +1

      We are taking away half of the width of the textbox from its global position to center it. If you didn't have that - there (and feel free to try this in Godot) you would just be setting the textbox's position coordinate to half of its width. This makes no sense and your textbox would be somewhere in the upper left corner of the screen.

    • @shanekammerman9583
      @shanekammerman9583 Před 15 dny

      @@DashNothing Ohhhhh! Thanks so much for the explanation and the great tutorial!

  • @josueruiztorres4103
    @josueruiztorres4103 Před 8 měsíci

    My Text_box dont dessapear. Help

    • @DashNothing
      @DashNothing  Před 8 měsíci

      In the DialogManager in the unhandled_input function when the advance dialog action is pressed make sure you have text_box.queue_free() called. Hope that helps!

  • @sixsalt1406
    @sixsalt1406 Před 2 měsíci

    Hello, I have followed your tutorial, however I cannot seem to get it to work properly. It is only showing the first letter of the first line for me, any ideas on how I might fix this?

    • @DashNothing
      @DashNothing  Před 2 měsíci

      Sounds like your timer's timeout signal isn't connected. Can you check that?

    • @sixsalt1406
      @sixsalt1406 Před 2 měsíci

      @@DashNothing thank you that fixed it but now it is printing infinitely until I click again

    • @DashNothing
      @DashNothing  Před 2 měsíci

      @@sixsalt1406 What do you mean by infinitely? Do the letters of the line repeat in a loop?

    • @sixsalt1406
      @sixsalt1406 Před 2 měsíci

      @@DashNothing yes that's exactly right, the line repeats

    • @DashNothing
      @DashNothing  Před 2 měsíci

      @@sixsalt1406 Are you missimg the return at 6:16? It stops the timer from starting again and the dialog should be stopped until advance_dialog key is pressed.

  • @Gamesablaze
    @Gamesablaze Před měsícem

    Hi, I'm having an issue with making an NPC talk.
    The code I used was this:
    var can_talk = false
    const lines: Array[String] = [
    "Hello!", "What brings you here?" ]
    func _on_area_2d_body_exited(body):
    if body.has_method("player"):
    can_talk = false
    func _on_area_2d_body_entered(body):
    if body.has_method("player"):
    can_talk = true
    func _physics_process(delta):
    if can_talk == true and Input.is_action_just_pressed("start_dialogue"):
    DialogManager.start_dialog(global_position, lines)
    #The "start_dialogue" button is the tab button.
    But when I move my Character to the NPC and press the tab button, nothing happens.
    Could you please help he solve this problem?

    • @DashNothing
      @DashNothing  Před měsícem

      Does the player really have a method called "player"? You put that as a requirement to enabling can_talk.

    • @Gamesablaze
      @Gamesablaze Před měsícem

      @@DashNothing Yes

    • @DashNothing
      @DashNothing  Před měsícem

      @@Gamesablaze Then check if the area detects the player at all - area's collision mask should include player's collision layer.

    • @Gamesablaze
      @Gamesablaze Před měsícem

      @@DashNothing I checked and the area’s mask is equal to the layer of the player.
      I even added print(“hello”) after the if statement to make sure if the if statement works, and it was printing “hello” when I tested it, but nothing else happened.

    • @DashNothing
      @DashNothing  Před měsícem

      @@Gamesablaze Do a similar print statement at the start of DialogManager's start_dialog function to see if that gets called

  • @CosmicKingEvol
    @CosmicKingEvol Před 2 měsíci +1

    I did this tutorial and my whole screen glitching up when it spawns.. :/

    • @CosmicKingEvol
      @CosmicKingEvol Před 2 měsíci

      would really love some help..please
      The code for the text box
      extends MarginContainer
      @onready var timer = $LetterDisplayTimer
      @onready var label = $MarginContainer/Label
      const MAX_WIDTH = 256
      var text = ""
      var letter_index = 0
      var letter_time = 0.02
      var space_time = 0.06
      var punc_time = 0.2
      signal finished_displaying()
      func display_text(text_to_display: String):
      text = text_to_display
      label.text = text_to_display

      await resized
      custom_minimum_size.x = min(size.x, MAX_WIDTH)

      if size.x > MAX_WIDTH:
      label.autowrap_mode = TextServer.AUTOWRAP_WORD
      await resized
      await resized
      custom_minimum_size.y = size.y

      global_position.x -= size.x / 2
      global_position.y -= size.y + 24

      label.text = ""
      _display_letter()

      func _display_letter():
      label.text += text[letter_index]

      letter_index +=1
      if letter_index >= text.length():
      finished_displaying.emit()
      return

      match text[letter_index]:
      "!", ".", ",", "?":
      timer.start(punc_time)
      " ":
      timer.start(space_time)
      _:
      timer.start(letter_time)
      func _on_letter_display_timer_timeout():
      _display_letter()
      Code for the Dialogue Manager.
      extends Node
      @onready var text_box_scene = preload("res://textbox.tscn")
      var dialog_lines: Array[String] = []
      var current_line_index = 0
      var text_box
      var text_box_position: Vector2
      var is_dialog_active= false
      var can_advanced_line = false
      func start_dialog(position: Vector2, lines: Array[String]):
      if is_dialog_active:
      return

      dialog_lines = lines
      text_box_position = position
      _show_text_box()

      is_dialog_active = true


      func _show_text_box():
      text_box = text_box_scene.instantiate()
      text_box.finished_displaying.connect(_on_text_box_finished_displaying)
      get_tree().root.add_child(text_box)
      text_box.global_position = text_box_position
      text_box.display_text(dialog_lines[current_line_index])
      can_advanced_line = false


      func _on_text_box_finished_displaying():
      can_advanced_line = true


      func _unhandled_input(event):
      if (
      event.is_action_pressed("advance_dialog") &&
      is_dialog_active &&
      can_advanced_line
      ):
      text_box.queue_free()

      current_line_index += 1

      if current_line_index >= dialog_lines.size():
      is_dialog_active = false
      current_line_index = 0
      return

      _show_text_box()

      Just..why would my whole screen be glitching up. Any help, I would be very thankful of.

    • @DashNothing
      @DashNothing  Před 2 měsíci

      @@CosmicKingEvol Well that's new. How exactly is it glitching up? What do you see?

    • @CosmicKingEvol
      @CosmicKingEvol Před 2 měsíci

      @@DashNothing actually, it appears to ber something to do with the forward+ thing and not with your code, so sorry for my mistake. It happening after adding the dialogue code was coincidence.

  • @Zap-Plays
    @Zap-Plays Před 5 měsíci

    Alright, I'm at a loss. I'm not getting any errors, and I'm like 99.99% sure my code is the exact same as yours(minus a few name changes). I even started a new project with nothing else attached, followed both tutorials from start to finish, and still reproduced the same problem.
    problem: When I interact with my npc, the sprite for my npc will flip_h, but no dialog box appears above them. I'm still new to Godot and coding, so maybe I'm somehow missing something?
    I implemented the print() statement, like you said in the other comment, but maybe I'm doing that wrong as well? with how it is now, nothing is happening in the output box.
    func _on_interact():
    print()
    DialogManager.start_dialog(global_position, lines)
    npc.flip_h = interaction_area.get_overlapping_bodies()[0].global_position.x < global_position.x
    await DialogManager.dialog_finished

    • @DashNothing
      @DashNothing  Před 5 měsíci

      We're gonna figure this out.
      When you write print() you have to put some text in quotation marks inside the braces to make it show in the output. So in the interact function I would put print("NPC interact"), and in DialogManager's start_dialog func at the very top I would put print("Dialog started"). This way you will see how far your code goes and where to look for a problem.
      Try that and tell me what gets printed.

    • @Zap-Plays
      @Zap-Plays Před 5 měsíci

      @@DashNothing Thanks for replying. I've implemented both print() statements. This is what the output box reads after I interact with my npc:
      NPC interact
      Dialog started

    • @DashNothing
      @DashNothing  Před 5 měsíci

      @@Zap-Plays Good, do the problem is definitely with the DialogManager, probebly in the start_dialog function or in the textbox. If you erite a name of a variable into thr print, it will print the value of the variable. So if you add print(lines) at the top of the start_dialog you can chack if those are correct. You can do the same in the textbox's functions to check if they get called and what the values of variables are. This will help you figure out at ehich point things go wrong.

    • @Zap-Plays
      @Zap-Plays Před 5 měsíci

      @@DashNothing Alright, this was very helpfull!
      I added the statement print(lines) at the top of the start_dialog func and the lines of dialog I wrote in the npc script came out in the output box.
      just to make sure I was doing this correctly since "lines" was already declared in the func statement itself, I switched the print(lines) to print("work"), which produced "work" in the output box as it should, but when I used print("work") in the _show_text_box func, nothing happened.
      What should I do from here?

    • @Zap-Plays
      @Zap-Plays Před 5 měsíci

      For refrence, this is what my script looks like from the start_dialog func onward
      func start_dialog(position: Vector2, lines: Array[String]):
      if is_dialog_active:
      return

      dialog_lines = lines
      text_box_position = position
      _show_text_box()

      is_dialog_active = true

      func _show_text_box():
      print("work")
      text_box = text_box_scene.instantiate()
      text_box.finished_displaying.connect(_on_text_box_finished_displaying)
      get_tree().root.add_child(text_box)
      text_box.global_position = text_box_position
      text_box.display_text(dialog_lines[current_line_index])
      can_advance_line = false

      func _on_text_box_finished_displaying():
      can_advance_line = true

      func _unhandled_input(event):
      if (
      event.is_action_pressed("advance_dialog") &&
      is_dialog_active &&
      can_advance_line
      ):
      text_box.queue_free()

      current_line_index += 1
      if current_line_index >= dialog_lines.size():
      is_dialog_active = false
      current_line_index = 0
      dialog_finished.emit()
      return

      _show_text_box()

      @@DashNothing

  • @plasticcup8987
    @plasticcup8987 Před 6 měsíci +1

    How do you add the dialogue box to the sprite.

    • @DashNothing
      @DashNothing  Před 6 měsíci

      I don't understand the question. Do you want to have a sprite inside the text box or make a text box appear over a sprite?

    • @plasticcup8987
      @plasticcup8987 Před 6 měsíci

      @@DashNothing I am really new to godot like super new, I was just wondering how exactly the dialogue box should appear on top of my npc.

    • @DashNothing
      @DashNothing  Před 6 měsíci

      @@plasticcup8987 The NPC can call DialogManager.start_dialog() from its script and if everything is set up like in the video, the dialog will start amd the box will be above its head.

    • @plasticcup8987
      @plasticcup8987 Před 6 měsíci

      ​@@DashNothing For some reason the func instantiate isn't working for my godot 4.1.1, any fix?

    • @DashNothing
      @DashNothing  Před 6 měsíci

      @@plasticcup8987 Are you getting an error on that line? Have you preloaded the text box scene that you want to instantiate at the top of the script?

  • @RCFrostBite77
    @RCFrostBite77 Před měsícem

    I keep getting an error " Invalid get index '0' (on base: 'Array[String]' ".
    I don't see anyone else getting that problem and don't know how to fix it.

    • @DashNothing
      @DashNothing  Před měsícem

      On which line do you get the error? Did you make a var lines in the NPC script like in the video?

    • @RCFrostBite77
      @RCFrostBite77 Před měsícem

      @@DashNothing Yeah, I made the var lines on the NPC script

    • @DashNothing
      @DashNothing  Před měsícem

      @@RCFrostBite77 On which line is the error?

    • @RCFrostBite77
      @RCFrostBite77 Před měsícem

      @@DashNothing its showing the error on text_box.display_text(dialog_lines[current_line_index])

    • @DashNothing
      @DashNothing  Před měsícem

      @@RCFrostBite77 What does your var dialog_lines look like?

  • @yurimarques2509
    @yurimarques2509 Před 6 měsíci

    5:39

  • @brucelee7782
    @brucelee7782 Před 4 měsíci

    wtf is this "resized" property not even in the docs?

    • @DashNothing
      @DashNothing  Před 4 měsíci

      It is - it's a Control's signal. In the docs it simply says: "Emitted when the control changes size."

    • @brucelee7782
      @brucelee7782 Před 4 měsíci

      ok thanks! @@DashNothing

  • @Danny1981able
    @Danny1981able Před 8 měsíci

    HI I get the following error at the unhandled_input function. At the sprit.flip_h the true if loop doesn't close and the error says Expected "else" after ternary operator condition

    • @DashNothing
      @DashNothing  Před 8 měsíci

      That line is cut off in the video because it isn't relevant to the text box. But the error occurs because when using the ternary operator (if ... else ... all in one line), you have to write the else part in the same line as well.
      So something like:
      var a = 1 if b == c else 2

    • @Danny1981able
      @Danny1981able Před 8 měsíci

      so what did you write there?
      @@DashNothing