0 votes

I have created a custom node via editor plugin.
This node has a var speed. Is there any way to set this variable?
Thanks for help.

in Engine by (25 points)

from editor or runtime?

1 Answer

+1 vote
Best answer

You can set this variable just as any variable in a node script (doesn't matter if it's with a plugin or in the game). Get the node, and do myNode.speed = x for example.
If you want to set the variable from the editor, use the export keyword.

by (28,740 points)
selected by

Oh my god, I feel so stupid right now. The export keyword was exactly what I needed! Thank you!

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.