you cant override variables in script by redeclaring them. The only way this work is to either set these values in a method(_ready or _init, for example) or to use @export for scenes
class_name MyBaseClass
@export var my_undefined_variable: String
class_name MyClass extends MyBaseClass
#Set the variable in the inspector
The @abstract keyword is something you should only be using if you understand object oriented programming and how and when to use abstract classes. The @abstract keyword is often overused even by experienced developers.
An abstract class must have NO implementation of code. That means it does nothing unless it is extended by an inherited class which then must implement all functions. It is useful when you say have a CollisionShape2DShape (i.e. the Shape that goes inside it), and they all have to implement the same things but their implementations are so very different that it doesn’t make sense for them to share boilerplate code.
Abstraction is not necessary to implement inheritance. And if used incorrectly, it makes code MORE difficult to understand. Abstract classes are something that feel very clever when you implement them (like internal classes), but become very hard to maintain when you come back to them later.