Text Engine: различия между версиями
Материал из Поле цифровой дидактики
(reverting edit) |
Patarakin (обсуждение | вклад) м (1 версия импортирована) |
(нет различий)
|
Версия 11:33, 21 июля 2022
Шаблон:Merge Шаблон:Stub 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 ()