I tried typing down the name of the object, but it says that I need a dot or smth.. I want all objects of that type to be in the array.. How?
Array only takes in number and text, not the object type. Because of this, you may wish to use either number or text to refer to an object you want.
But may I ask, what are you trying to accomplish? Why do you want to store object type in an array?
I'm trying to make an object upgrade to more levels using only 1 button every time, so when that button is clicked, I just upgrade it to the object with an index +1 of the previous one, instead of checking which object needs to be upgraded..
Upgrade the object using object type in array? So are you gonna destroy the original object and create the upgraded version in the original's place? Something like this?
Yes, that's the plan :3
Develop games in your browser. Powerful, performant & highly capable.
C2 can't create instances from text string but you can do so with Nickname plugin: and store the name of your objects in text in the array. Then, refer to these text and create objects with respect to your plan.