idk how its called but i wanna do something like
var sprites : Dictionary<Sprite2D>

is it possible?

I guess it is, dictionary can use almost anything as key (at least string and int AFAIK), object here could be considered as number, but for the sake of what you want to achieve, it would be better to use dictionary for the best they have to offer and for what they've been designed to: give you a meaningful key to access data instead of the index for array.

There is no benefits of using an object as key to a dic.

You may want to use an Array. A Dictionary is like a JSON object which holds items of random type.

  • Zini replied to this.

    oh Thank you! i just wanted to know if typed dictionaries was a thing in godot because i love declaring types, and i didn't know it was called "typed dictionary." Sorry for the lil confusion ;3