Ok so if I understand you correct you have X amount of characters available, at some point during the game, the player can unlock these, and use them in later games if they wish. So when the player starts a new game you would like to load each unlocked character and show them in a selection menu, which is a tilemap?
[quote:2pkn6525]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
You don't have to pull the image from an url, if you use a tilemap it is much easier to store each character in the tilemap it self.
So in Tile0 you make an image which might say "Unavailable" which you use for all characters that haven't been unlocked yet. As they get unlocked you simply switch a given tile to another tile. So if the player unlock character 1 you switch the tile (0,0) to tile1.
If I understood you correct, you only need to store whether a character have been unlocked or not in a file, so you know this whenever the player starts your game. If you keep the family containing you characters you don't have to use an array to store there stats. These stats you make in the family and whenever a character is loaded you simply read these values from the family it self (The specific character sprite).
So after you have started the game, and found out that character 1 and character 2 is available, you can make a function that get the stats for each character. If you also need it to be placed at a certain position, you can pass this as well, so:
Requires:
Parameter 0 = Character.UID
Parameter 1 = Position
Function "Load character stats"
Sub event 1:
Pick character1.UID = Function.Param(0) (Will only select character1 if the passed UID matches it, else it will just skip it)
--------- If Function.Param(1) = 1 (Will place character 1 at position 1)
Set textbox_CharacterName_1 = Character1.Name
Set textbox_CharacterHealth_1 = Character1. Health
Set Tile.At(0.0) to Tile1 (Assuming that this hold the image of character 1)
--------- if Function.Param(1) = 2 (Will place character 1 at position 2)
Set textbox_CharacterName_2 = Character1.Name
Set textbox_CharacterHealth_2 = Character1. Health
Set Tile.At(1.0) to Tile1 (Assuming that this hold the image of character 1)
Sub event 2:
Pick character2.UID = Function.Param(0) (Will only select character2 if the passed UID matches it, else it will just skip it)
--------- If Function.Param(1) = 1 (Will place character 2 at position 1)
Set textbox_CharacterName_1 = Character2.Name
Set textbox_CharacterHealth_1 = Character2. Health
Set Tile.At(0.0) to Tile2 (Assuming that this hold the image of character 2)
--------- if Function.Param(1) = 2 (Will place character 2 at position 2)
Set textbox_CharacterName_2 = Character2.Name
Set textbox_CharacterHealth_2 = Character2. Health
Set Tile.At(1.0) to Tile2 (Assuming that this hold the image of character 2)
Then you just create one for each character and each position. And then you just call this function every time you need to load a character.
Call function("Load character stats", <FamilyCharacter.UID or specific character UID>, <Position of where you would like the character to be loaded to>)