I want a fair amount of information with some of my sprites, more than can be stored in a few variables. You can't create an array as an object variable and you can't put an array in a container. So what would be the best way to store a 'large' amount of info with sprites (or preferably, families)? I'm thinking of a string that I can construct and deconstruct as I need it. Or is there a better method?
You can relate the object instance to the array by way of instance variable. So object.var is array.x, object.var=1 is all data at x=1.
you can't put an array in a container.
You can! I do it all the time. Just make sure to set Global=No in array properties.
You can put arrays into containers.
Oh, I didn't know about turning off the global property. That's cool, problem solved, thanks :)
And there's no way to have an array attached to a family though? That would be even more useful.
Develop games in your browser. Powerful, performant & highly capable.
Not attach, but you can link array instance by UID to each family member.
Family on created -> Create new Array, Family Set ArrayUID to Array.UID
Oh cool, nice.
I was just creating a new array with each instance and then having a variable for the array that matches the instance UID. Not sure if that's easier, it works at least. I'll try out your method, see which works better.
If you link one array instance with one family instance, it doesn't really matter where you define the 'ChildUID' variable.
It only makes difference when you need to link one-to-many.