[gdscript] operator[] for user class

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

Hello,

I’m wondering is there a way to override operator[] for an user class in gdscript like it can be done in C++? It would be good to have that feature for user-classes.

Thanks!
/sx2

:bust_in_silhouette: Reply From: sash-rc

No.
Already answered https://forum.godotengine.org/63552/godot-class-operator-overloading

But you can use C++ :slight_smile: