0 votes

I have a Sprite that looks like a Monitor and it has a Label child. I want that every frame one completely random character (at the moment, I don't care they can be weird signs or just english letters and numbers) is written into the label's text and when the Label reached the monitor's display size, it should scroll down.

in Engine by (377 points)

1 Answer

0 votes

Consider switching the label to a RichTextLabel, which has scrolling functionality.

To have the label perform an action each frame you will need to attach a script to the _process function. Though I would recommend that you add a check based on some sort of duration or timer value so that the visuals are frame rate independent.

# Called every frame, even when the engine detects no input.
func _process(delta):
  # your code here

https://docs.godotengine.org/en/stable/getting_started/workflow/best_practices/godot_notifications.html?highlight=_process#process-vs-physics-process-vs-input

by (856 points)
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 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 webmaster@godotengine.org with your username.