Greetings,
I'm trying to create a game with several characters, all of them sharing the same controls (one by player). I don't want to repeat all my code for each character, so I tried to gather all the heroes objets on a "heroes" family, and write in my scripts sheets only events like "heroes / set animation to "walk" (all the characters animations share the same name for the animations).
Then, I add many variables and behaviors to that family, but some of those variables need to be personalized. For exemple, I declare in my events sheet
Keyboard / Key code heroes.btn_left is down / Simulate Platform pressing Left[/code:2300vcv7] where btn_left is the variable I need to set for each character. I tryed to set them in the properties of the characters, but they then override the family (heroes) variables. I tryed to set them at the start of the layout (character / set btn_left to 81), but it still doesn't work.
How should I use the Families properly to use the same events for all my characters, and personalize their variables ? Or if it's not appropriate for what I'm looking for, what should be the best solution ?
Thanks for your help.