-2

你知道 rpgs 如何有滚动/出现的字母吗?我想在 Small Basic 中重新创建它

4

1 回答 1

1

这是在 Small BASIC 中使用 rpg 文本的方式:

dialogueText = "add text here"                  'Text string
dialogueTextX = (X)                             'Y value for the text to appear
dialogueTextY = (Y)                             'X 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

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

于 2021-10-03T05:27:42.507 回答