如何在Small Basic中制作打字机文本效果?



我想让打字机的文字效果在小基本,但我不确定如何。我试了很多方法,但都不起作用。

这是如何在Small BASIC中使用rpg文本:

dialogueText = "add text here"                  'Text string
dialogueTextX = (X)                             'X value for the text to appear
dialogueTextY = (Y)                             'Y value fpr the text to appear
rpgText()                                       'Calls the sub

Sub rpgText
textLength = Text.GetLength(dialogueText)                'Getting loop value
textCheck = 1                                            'Start of string
textCheck2 = 1                                           'Length of string
textInput = Text.GetSubText(dialogueText, textCheck, 1)  'Grabs a letter from the string
textOutput = Shapes.AddText(textInput)                   'Displays the letter grabbed
For i = 1 To textLength                                  'Loop
Shapes.SetText(textOutput, textInput)                  'Adding to that letter to form the string
Shapes.Move(textOutput, dialogueTextX, dialogueTextY)   'Moves it to X and Y value specified
textCheck2 = textCheck2 + 1                             'Value to grab letter
textInput = Text.GetSubText(dialogueText, 1, textCheck2)'Grabs letter 
Program.Delay(20) '
EndFor
EndSub

(是的,我知道我回答了我自己的问题,但这已经经过测试,它有效。)

最新更新