DocumentInQuestion.png It has been suggested that this page's contents be merged with the page Text Rendering. You can discuss this on the page's talk page. (January 2021)
Document stub.png This article is a stub. It may be incomplete, unfinished, or have missing parts/sections. If the article can be expanded, please do so! There may be suggestions on its talk page. (April 2021)

Text Engines have several uses in Scratch. One common reason a text engine is used for dialog.

Creating The Engine

Code

The code is fairly simple, but a little hard to follow/understand.

define Player Dialogue Block (Text) (Text Timer)
set [Numbers# v] to (1)
set [Word v] to ()
repeat (length of (Text))
change [Numbers# v] by (1)
say (join (Word) (letter (Number#) of (Text)
set [Word v] to (join (Word) (letter (Number#) of (Text)
wait (0.05) seconds
end
wait (Text Timer) seconds//how long the text is displayed
say ()
Note Note: There is an issue with this custom block. When a character talks, it will chop out the first letter of the text. To fix this issue, add a space before the text. If that does not work, add another letter to it.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.