I am making a platform game with multiple characters.
The user chooses the character in the first layout and then that character is used as the player in the next layout (Gameplay).
Now, I've way too many events for the character sprite in the gameplay and I'd have to repeat each of those for the other character sprites.
Layout 1: Character Selection.
Click on a sprite which represent the character and load the next layout. (I've a variable set here "Character" which sets its value to 1, 2 or 3 according to which character the user chooses)
Layout 2: Gameplay
Here, if I have a different sprite for every character (each one having its own set of animations) I will have like 30 repeated events.
What I'd like to have is, in this gameplay layout, I set this condition:
On start of layout,
If character=1, use Sprite1 as the character sprite (not sure how to implement this)
If character=2, use Sprite2 as the character sprite
Is there a way to achieve this, without repeating 60 events ?
After doing a search here, I found I could use Object Family as a solution. I tried it, but I am not getting it to work right.
I put those 2 sprites in a family "Players" and set a new instance variable "name" to it. Then I assigned 1 and 2 as values to "name" for sprite 1 and sprite2 respectively, thinking I might be able to use that to refer the members.
But Now what ?
I mean, there's still no way I could choose b/w the 2 members of that family and add that in those 30 events/actions.
Please help :)