I am making a some style of fighting game, where at the initial screen you can select one of the 3 characters.
Then in the second screen I have a problem with the events, which basically consist that I am repeting every time the same actions.
If the character 1 is selected I have this:
Keyboard D is down---> sprite1: Simulate platform pressing right
Sprite1 have all the animations for the character selected.
But, the problem is if the user selected another character I will need to repeat the same code changing only the object:
Keyboard D is down --> sprite2: Simulate platform pressing right
This is because, the sprite2 have all the animations for that character.
So I am wondering if exist a way to reduce the events, and put the same in less events, and not repeating all this.
Because -for example - if I have 40 characters I will need to repeat again 40 times the same event, due the 40 sprite objetcs are different.
Thanks for your help