Im not really sure what you are trying to do.
[quote:3h7aws6w]The problem I am running into is that I can not link my array and family. Meaning that I cant run though the array and have each row correlate to a member of the family. I have tried having each row being the UID of each member but I can not find a way to automate that idea. And simply having Bob.UID in the first part of each row does not work.
I don't understand what you mean that you want to link the array and family?
The array hold whatever data you add to it, and can not be linked to anything, in theory any object in your game can use these data if you want them to, depending on your conditions for reading and making use of the content in the array. If what you mean is that you have stored some data to the array at some point and then when a character is available you want to use this to set some settings for the character, then you have to make sure that these characters UID matches the ones stored in the array, which it could sound like it doesn't.
I get the impression that this is what you have been trying. But its very hard to troubleshoot when not sure how and what you store in the array.
The family is also something that you cant link anything to, it more or less just a wrapper that can hold a group of other objects of different kinds but which share some common attributes, and therefore makes it easier to work on several different types of objects at the same time. So I don't understand what you mean with linking to it? If your characters are part of the family they are already "linked" to it through that and can be selected using:
Pick Random FamilyCharacters
Character1.UID = FamilyCharacters.UID (Assuming that the random Familycharacters chosen is a character1)
Can you try to explain what you want to use the family for and when, and what the array hold of data that you need. And how and when you store the data, in correlation to when you need to read from it, think that would make it easier to help you?
Thank you for replying,
It very well could be that I am approaching the entire problem wrong but when I say I need to link the array and the family I simply mean that I wish to have a group of objects (Character Images/Avatars) and sort them so that they will appear in order on my menu.
example if I have a array
Name, Stat1, Stat2, Unlocked
Bill,2,1,False
Ted,1,3,True
Sue,2,2,True
And then have a command to build a populate a menu I need it to only list Ted and Sue, and exclude Bill. I also want it to on each menu tile to list Stat One and Stat Two in a textbox. Now each Avatar is located off screen and I need to pull them in and place them on every tile that is generated.
So what I have done is make a sprite for each tile and move the sprite family to a pin point on that tile. How ever it will grab all the tiles and place them on the last tile generated. I have tied to use pick instance random and it will do as I wish, well it will place one avatar on each tile somewhat. But unless i want to create a family variable for all the sprites It will not work efficiently when I scale this up.
I have tried using the UID (TedSprite.UID) and placing them in the array so I can say that when running a loop in the array the avatar sprite is linked that particular row in the array
What I really want is to have a generic avatar that will be created for each tile and then change the sprite img form a URL in my project files. So using the above example I will create 2 tiles in my menu. Each tile will have the generic avatar pinned along with a textbox. Then tile0 will change the avatar to Ted and the text box will update with Ted's stats. then the next tile in the menu will be Sue's again doing the same.
So to answer you question no, I do not really need the family but what I need is to be able to sort the array and have it correspond to a sprite. As I write this the idea came to me that instead of using the UID of sprites or IID of the avatar family. I will look into just having the avatars in a folder in my project file and pull their img form there to replace a generic avatar. thus negating the need of a family. Worth a shot so give me some time and I will report back
Though if anyone has a solution that I am over looking please post.
Thanks,
CrazyVulcan