0 votes

I can't find any tutorials about this, I'm looking for something that has the functionality of a "component" in other engines. I'd like to have something that I can quickly import/insert/load/put into any node and make it have health that can be changed externally. How would I go about that?

Godot version 3.4.4
in Engine by (15 points)

1 Answer

+1 vote
Best answer

You can use a custom Resource for this. There is information about this in the docs:
https://docs.godotengine.org/en/stable/tutorials/scripting/resources.html#doc-resources

I have also created a brief example to demonstrate:
http://kidscancode.org/godot_recipes/basics/custom_resources/

by (21,714 points)
selected 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.