Creating Animated Multi-line Dialogue [ Difficulty 7/10 or 🟧 ]

I wasn’t really sure what to name this so if you have a better one then hit me[1]. AND YES, I’M STILL WORKING ON MY UNDERTALE GUIDE. This is and improved version of the text system in that guide. However, I liked this idea so much that I felt it should get it’s own glory as well.


What is this is you decide on some dialogue and then it will be distributed on 3 different lines. Then it will use a typing effect to right it out. Ready? Here we go. [2]


Devices

  • 1x Barrier
  • 9x Property
  • 3x Text
  • 6x Trigger

Steps

Step 1: The Basics
  1. Create a Barrier with it’s collision set to off, it’s color set to white, and it’s alpha set to 0.01. It should look something like this:
    image

  2. Now we add a Text. You can set the settings to whatever works for you! Make sure to make the Text - for now though. Add it right here:
    image

  3. Now did you know that W is the widest letter? Using W as a measurement I figured out that in this box I can fit 40 characters[3]. Remember this number for later!

  4. Now copy and paste that text two times like so:
    image

  5. Finally we are going to add a Property. Set property name to Base Dialogue. When property changes, transmit on dialogueCheck!

Step 2: Splitting Up Dialogue
  1. Have a trigger that has it’s trigger by player collision and visible in-game to No. Have it trigger when receiving on dialogueCheck

  2. Now on that trigger add this: This is going to be a LOT of blockcode but, I’ll do my best to explain it.


    I’m gonna be so fr when this work I nearly cried out of happiness.
    If you pull this image up in a seperate tab it’s less grainy

    a. We set a variable, dialogueLength to the length of our “Base Dialogue”
    b. We run an if statement. If our “dialogueLength” > 40[4] then:
    b1. We set a variable called “dialogue1” to a substring from the text “Base Dialogue” The string will be from the first letter to the 40th letter
    b2. Then we set a variable “spaceLocater1” that is the last occurence of " "[5] in “dialogue1”. If there is no space it will set the variable to 0.
    b3. Now we have another if statement. If “spaceLocater1” = 0[6], then:
    b3a. It will set property “Dialogue 1” to variable “dialogue1”.
    b3b. It will set variable “dialogue2” to a substring from text “Base Dialogue”, from letter # 41 to the last letter.
    b4. Else if “spaceLocater1” = 40[7] then:
    b4a. It will set property “Dialogue 1” to variable “dialogue1”.
    b4b. It will set variable “dialogue2” to a substring from text “Base Dialogue”, from letter # 41 to the last letter.
    b5. Else:
    b5a. It will set variable “dialogue1spaced” to a substring from text “dialogue”, from first letter to [“spaceLocater” - 1]. This means that instead of cutting off the word, it will instead cut it off at the space.
    b5b. It will set variable “dialogue2” to creating text with [substring from “dialogue1”, from letter # “spaceLocater” to letter # 40] + [substring from “Base Dialogue”, from letter # 41 to last letter]. This will add-on the the cut-off word we took off onto the second dialogue.
    b5c. We set property “Dialogue 1” to “dialogue1spaced”.
    b5d. We set property “Dialogue 2” to “dialogue 2”
    c. Else[8]:
    c1. We are going to set property “Dialogue 1” to get property “Base Dialogue”

  3. Now we are going to add a Property. Set property name to Dialogue 1. When property changes, transmit on setDialogue1!

  4. Next we are going to add a Property. Set property name to Dialogue 2 Unconfirmed. When property changes, transmit on checkDialogue2!

  5. Now we need to copy and paste that trigger from a couple #s ago and have it trigger when receiving on checkDialogue2.

  6. Make the following changes to the blockcode:

  7. Now we are going to add a Property. Set property name to Dialogue 2.

  8. Add Property. Set property name to Dialogue 3 Unconfirmed.

Step 3: The Animation
  1. Create a Property with its property name set to Loop. Its property type should be Number and its default should be 1.

  2. Create a Property with its property name set to d1Typing. Its property type should be Text and it when property updates broadcast on… text1

  3. Create a Property with its property name set to d2Typing. Its property type should be Text and it when property updates broadcast on… text2

  4. Create a Property with its property name set to d3Typing. Its property type should be Text and it when property updates broadcast on… text3

  5. Create a Trigger that has its trigger by player collision and visible in-game set to No. It should trigger when receiving on… setDialogue1 and have a trigger delay of 0.1. Have the trigger run this blockcode:


    Once again I’m going to do my best to explain this blockcode…
    This is called a “For Loop”
    a. First it checks to see if our property “Loop” is less than “Dialogue 1”. We don’t want it to be bigger than “Dialogue 1” or it will screw with the animation.
    a1. Next it sets our property, “d1Typing” to a substring of “Dialogue 1” from the first letter to “Loop”. So if our text phrase was Hello!, the first time it loops it would be H, then He, the Hel, etc.
    a2. Next, we increase our Loop property by 1 when it loops, it will draw the correct substring.
    a3. Now we broadcast on that channel so that way our For Loop, loops :0
    b. Else:
    b1. It will reset our “Loop” property so the next time it loops it loops correctly
    b2. Finally, it broadcasts on that channel to animate the next line of dialogue.

  6. Create a Trigger that has its trigger by player collision and visible in-game set to No. It should trigger when receiving on… setDialogue2 and have a trigger delay of 0.1. Have the trigger run this blockcode:

  7. Create a Trigger that has its trigger by player collision and visible in-game set to No. It should trigger when receiving on… setDialogue3 and have a trigger delay of 0.1. Have the trigger run this blockcode:

  8. Now you remember that text we made forever ago? Go into the first on and add this blockcode when receiving on… text1
    image

  9. In the second bit of text add this blockcode when receiving on… text2:
    image

  10. Finally, in the third bit of text add this blockcode when receiving on text3:
    image

Step 4: Ending & Resetting the Text

We are in the home stretch!

  1. Create a Trigger that has its trigger by player collision and visible in-game set to No. It should trigger when receiving on… finished and have a trigger delay of 5. Have the trigger run this blockcode:

    In our final block of code, it resets everything so it is prepared for the next time you want to set some dialogue up!

Polls

What is the difficulty?
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
0 voters
Rate the Guide!
  • :star:
  • :star::star:
  • :star::star::star:
  • :star::star::star::star:
  • :star::star::star::star::star:
0 voters

Outro

I hope that you enjoyed this guide! Credits to myself[9] and @VALUEX [10]! Now back to working on Undertale…


  1. Don’t really hit me ↩︎

  2. *You feel like your going to have a bad time. (Megalovania starts playing) ↩︎

  3. Note: The amount you can fit depends on the size of the box and the font and even the font size :O! Make sure to measure yourself!!! ↩︎

  4. Remember this is the biggest that the text should be? ↩︎

  5. That’s a space ↩︎

  6. That means there is no space ↩︎

  7. The last character in the string ↩︎

  8. So if the dialogue isn’t long enough to be split across multiple lines ↩︎

  9. Duh ↩︎

  10. Becuase he made an OG text animations guide ↩︎

5 Likes

AMAZING GUIDEEEEE!!!
Glad to see there are still some nice guides incoming!

3 Likes

This is a good guide! 6/5 Stars!

1 Like

Another great guide from Harharharhar83!
It is very impressive! Nice job!
I finally finished the reading lol
where is the 6/5 button? I want to rate it 6/5 so bad

3 Likes

Ive been doing my Research and the average guide of this quality is approximately 30 words long. Perhaps take that into consideration when naming this guide. But actually, I prefer HTM (How To Make), so I’d be biased in that area.

[1]

Still, I think this guide deserves a name fit for a Gimrick!


  1. (How To Create Interactable Turn-Based RPG Conversation) ↩︎

I actually struggled to name it because the main concept of it was that it split dialogue across multiple lines and “Splitting Dialogue Across Multiple Lines” is a bit of a mouthful.

2 Likes

Dividing Turn-Based Conversation Across Multiple Vectors…

1 Like

Eh I like mine. Its simple for smol brains for me to understand.
If I was submitting this as a project I would totally name it:
“Dividing Non-Player Character’s Exchange Across Multiple Vectors Using the Method of Block Coding”
(This isn’t me trying to be insulting I’m making a joke. You can laugh now Or not. Thats okay )

3 Likes
Don't you mean...

The Harharharian-Vauluian Method Of Dividing Non-Player Character’s Exchange Across Multiple Vectors Using the Method of Block Coding RPG-Style-ian [Dificulty 7/10 or :orange_square:] [Quality 5/5 or :star::star::star::star::star:] | Made especially for those who enjoy advanced interactions though-they-are-the-common-user-ian?

If your Megalovania guide is like this, then you will probably get a Famous Topic In No time!

This Topic Gets An Award!

:loudspeaker:

The Megaphone Of Broken Noise
Your Conversations Will Be Heard From Topics Away!
(See You On The Other Side Of Infinity![1])


  1. Oh my goodness I justs stole Unit_72’s catchphrase, please don’t come at me in April! ↩︎

1 Like

I might change its name to that on Aprils fools day

1 Like