Ok, so I admit defeat. I have been trying to figure out how to use Objects in an Array in MZ for days now and nothing that I try works. I have tried every suggestion I have found for creating an Object, adding Objects to an Array, retrieving Objects from an Array, removing Objects from an Array, etc. I have searched for every option I can think of an I even tried to follow the simple steps that are in the book Java Script For Kids that I am learning from.
I know how to use Arrays, but the Objects part is clearly eluding me.
And even though the Java Script that I have found seems easy enough, I just can't make it work in MZ. I must be missing something painfully obvious.
Would anyone be so kind as to provide a very simple example of how to add Objects to an Array, use the keys/values pairs from the Array, add new Objects or key/value pairs, change the values of keys, and removing objects or key/value pairs?
For instance, say I wanted to create an Array that stores the attributes of characters in Objects within the Array. So I have Characters 1-4, each with 4 attributes that have numerical values. Like STR: 16, INT: 14, DEX: 12, CON: 17.
I want to be able to add new characters to the Array, change values to appropriate Objects in the Array, and then I want to access those attributes for any given character to display.
I am either missing something really simple or maybe this isn't as easy in MZ as I think.
I would post my trials, but they are too numerous and I have no idea which ones were close and which ones were so far off it isn't funny.
Any help is greatly appreciated since clearly I am not going to be able to figure this out on my own.
And maybe using Objects in Arrays isn't that useful. I sort of thought it would be, but maybe not.
The Objects are hurting my brain.
Thanks!
I know how to use Arrays, but the Objects part is clearly eluding me.
And even though the Java Script that I have found seems easy enough, I just can't make it work in MZ. I must be missing something painfully obvious.
Would anyone be so kind as to provide a very simple example of how to add Objects to an Array, use the keys/values pairs from the Array, add new Objects or key/value pairs, change the values of keys, and removing objects or key/value pairs?
For instance, say I wanted to create an Array that stores the attributes of characters in Objects within the Array. So I have Characters 1-4, each with 4 attributes that have numerical values. Like STR: 16, INT: 14, DEX: 12, CON: 17.
I want to be able to add new characters to the Array, change values to appropriate Objects in the Array, and then I want to access those attributes for any given character to display.
I am either missing something really simple or maybe this isn't as easy in MZ as I think.
I would post my trials, but they are too numerous and I have no idea which ones were close and which ones were so far off it isn't funny.
Any help is greatly appreciated since clearly I am not going to be able to figure this out on my own.
And maybe using Objects in Arrays isn't that useful. I sort of thought it would be, but maybe not.
The Objects are hurting my brain.
Thanks!

