Extended script not updating with parent setget functions

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By juninhopernambucano

I have a prototype of a game that has some types of tiles that has an effect on the player.

I created a parent scene called Tile that has some functions and properties common to all tiles. Then I created the specific tiles scenes using Scenes/Create Inherited Scene and added a extended script from the parent Tile script for each child scene. In the end, I overwrote the desirable properties/functions/sprite on these specific tiles’ script/scene.

This worked great for some time, but now I’m adding an exported variable to the parent with a setget function, and this seems to have no effect on the children scenes. The exported variable appears on the children editor but the setget function isn’t called when I change the property.

Am I missing something or is there a better way to do this?

:bust_in_silhouette: Reply From: zhyrin

For me the base class’s setter gets called normally.
Does your setter have a side effect? Try making your scripts tool.

Yes, I forgot to make the children a tool script too. Thanks for helping

juninhopernambucano | 2023-03-01 19:28