by skydereign » Sat Oct 06, 2012 7:13 am
Think of it this way, what is the character select, and what does it do? It is most likely a collection of characters (icons that represent each one), that when you click one, it selects that character. To set that up you need two things, the character icons, and a way for the game to know which character you selected.
The character icons could be done in many different ways. First is to have a single image with all the icons (but this means you can't use mouse button down on individual characters). Another way is to have multiple actors, each with the animation of a different actor (this uses a lot of actors, and since the actors are so similar, you could probably get away with using clones). Last way would be to use clones, each clone having a different player icon.
Whichever setup you choose, the game still needs a way of choosing which player was picked. You could just create the actor right on the mouse button down, but then you don't have a way of determining which player was picked after the event. So, the only way to really store information in a game is a variable. You mentioned arrays, but arrays are useful for storing lots of information. In this case we only want one thing, which player was chosen. That can be stored in a single variable, where different values represent different players.
So now that we know we want to use a single variable to determine which actor was picked, we need a way of organizing which players have what value (character a=0, character b=1, character c=2, ...). The best method for this depends on our solution we use for displaying the icons. I suggest using clones, with different animations for each icon. Since each clone has a different animation (and each animation has a different animindex), we can use that as a way of categorizing the characters. More specifically, we can set the player variable equal to the animindex of the icon we click.
When you decide on the character (set the variable), start the game, and create the character type represented by the variable.