How to Print String in Godot using Visual Scripting
This is basic example tutorial on how to print string Hello World in Godot with Visual Scripting to debug you code. Print() Node is build in and can be very useful also for debugging your code on daily basis.
Create New Project Create 2D Scene for this example Give it a name Add Script Or RMB to Open Dialog Window and select Attach Script Set Language to Visual Scripting Visual Script Editor Search for premade function Ready Add new variable Edit Variable Set values Change to String Type Hello World as a Value Select & Drag to grid Search for Node Print Select & Drag Print Node to grid Arrange nodes and connect Add comment box Resize and add comment CTRL+S to save scene Play scene to test it Hello World should appear in Output Log
Function _ready
Unfortunately not available documentation for this function yet…
Variable String
A string is a data type used in programming, such as an integer and floating point unit, but is used to represent text rather than numbers. It is comprised of a set of characters that can also contain spaces and numbers.
Print Node
Nodes are fundamental building blocks for creating a game in Visual Scripting. We used such a block Print to display Hello World. This Node converts one or more arguments to strings in the best way possible and prints them to the console.