How to display dialog box?

I know about in-game dialogues but their text is being typed out and it seems you can’t use HTML (even for line breaks), and I’m more for something like in TD, when you join the game you can instantly see something like this:

Couldn’t find how to achieve this. Am I missing something about regular “in-game” dialogues or is this using some other kind of UI dialog? Any help?

Hey, look into action that opens dialog: https://www.modd.io/docs/functions/openDialogueForPlayer

Before using this action, you have to first create a dialog inside your Environment > Dialogues

I know about that but this is how my dialog shows up:

  • letters are typed out (instead of everything being shown at once)
  • no HTML (can’t add a line break)
  • OK/Close button is not at the bottom right but has full-width

The welcome to TD was written before dialogues were available. There is a restricted (and deprecated?) function called show custom modal to player. The modal allowed html to be entered but the risk with allowing raw html is that you could redirect to malware or offensive content.

I agree with the points you are making so I’ll suggest the following, we’ll have to wait to hear from m0dE if he agrees with anything.

  • we should accept \r\n or \n or <br> just some kind of way to make a newline.
  • if the letter print speed is 0 (or negative just some convention) for dialogs the text should just appear at once.
1 Like

I agree with you, I don’t need anything more than <br> for line breaks. Images would be cool, but it’s not that important. And no typing text out.

As for the button, I don’t care how it looks like :slight_smile: was just pointing out the difference

I have changed few things so that now you can.

  1. set 0 for Letter print speed in dialogue will print the text right away.
  2. you can now use %nl% to create a new line.
3 Likes

Wow that was fast :slight_smile: thanks guys!

1 Like