#Making a Proccedural world gen, ran through AI but its not working

10 messages · Page 1 of 1 (latest)

swift junco
#

so i am just learning GDscript by using online forums and Chatbot AI. ive ran multiple checks and for some reason this code isnt working. Could someone help me out?

little parrot
#

What's not working exactly ?

swift junco
#

when i click the button it does nothing

unborn harness
#

Button pressed callback has no link icon to it. Make sure it's linked to the necessary button. Besides, you're trying to add a script as a child to a node, which you can not. set_script is what you're looking for, as GDScript is not a node that you can add to a scene tree.

#

Plus, creating a script through code is weird. You could just make it a seperate script, put the code there, then add a node to the tree, assign that script and boom.

#

Then you would store a reference to that object that has the script to call functions.

#

And instance() is obsolete. It's instantiate() now.

#

Asking ChatGPT for gdscript2 codes will not work as AI don't know about it. It'll give you gdscript1 codes and they'll most likely be wrong.

little parrot
obsidian scarab
#

AI for programming is good only when you have a certain amount of knowledge about what you're asking it about. It's nice to have a tool that can quickly give you half-baked solutions which you can then fix, but expecting it to do all the work for you without learning the language will only be more trouble than it's worth.