0 votes

I know this is a stupid question, but how would I print a variable to the console?

asked Dec 31, 2019 in Engine by a human (111 points)

1 Answer

+2 votes
print(variable_name)

Hope this helps - not sure if you're asking for more. See here for details, and other print functions that you may find useful:
https://docs.godotengine.org/en/3.1/classes/class_@gdscript.html#class-gdscript-method-print

answered Dec 31, 2019 by kidscancode (17,714 points)

Doesn't help, thank tho

The print statement will have to be inside a function and that function will need to be called at some point. You can put it inside the _ready() function to have it trigger when the program loads, inside _process(delta) to have it trigger on every game process update, etc.

It's the answer to your question. If you explain a little more what you're trying to do, perhaps you can get a more complete answer.

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.