- Edited
In the Pastebin link below is a big but well-commented script that functions as I want it to, but I have some questions. I am a newcomer to Godot, arriving from years of using Gamemaker. First, is it possible for this script to create the nodes it needs, instead of having to create them in Godot? (I think it is. I have tried, but to no avail. Is this behavior recommended?) Second, if the above is possible, how would I add a blank "width_curve" as well as a blank fill "gradient" to two of the three created nodes? (This is only for the draw lines.) Right now, the things described above are done in the Godot engine.
All nodes are Line2D, and there are three child nodes. The first child node is intended to have a "width" of zero (in the inspector). Its name should be "match_line". The next two child nodes both need to have an empty "width_curve" as well as an empty fill "gradient". Their names should be "draw_line_main" and "draw_line_match".
I would greatly appreciate the help. If possible, I will submit this to the asset library for anyone to use. I can tell that it is not ready for that currently. Feel free to use this script for whatever. It is offered as is. Use it at your own risk. It should draw a shaded vector shape.
EDIT: I have realized that the match_line node must be made in the editor, as it defines points that are best edited in the engine.