+3 votes

Kind hard to find documentation for this problem.
In Godot 3 you can use extend "file_path" to inherit a script.
However, Godot 4 are showing some problem:
It said "could not solve super class inheritance"

Please let me know how to do it,
Thank you for your help.

Godot version 4.0 alpha
in Engine by (341 points)

It is not the "extend" problem, but some syntax error in the script which I try to inherit.
So the editor can auto debug the script you try to inherit.

1 Answer

0 votes

I got the solution. You just need to choose the file to inherit from when creating a new script.

by (341 points)

This is not required though. You should be able to choose later by simply modifying the script. The problem you had was probably about the syntax, or an error in the script you want to extend from.
According to 4.0 docs, the syntax did not change from 3.x. Maybe you made a typo. You could always check what the script looks like after you tried using the create dialog and see what went wrong.

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.