0 votes

So for the game i am making i want to make a title screen like minecraft which has a splash text that has randomly chosen line of text every time you boot up the game.
I want to make a thing like that which choses a random line of text from a .json file and then puts it in a label node.

Godot version 3.4.2(stable)
in Engine by (12 points)

1 Answer

0 votes
var a = ["aa", "bb", "cc"]

func _ready():
  randomize()
  a.shuffle()
  print(a[0])
  pass

Let me know if you can't add them where you want them

by (755 points)
edited by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.