-2

I want to make a typewriter text effect in small basic, but I'm not sure how. I've tried many ways, but none of them worked.

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Oct 12 '21 at 18:56

1 Answers1

1

This is how you would use rpg text in Small BASIC:

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

(Yes I know I responded to my own question, but this has been tested and it works.)

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 03 '21 at 05:35