Is there any way to change or replace references to families during runtime?
For example I have two families of sprites. During the whole of the code, it is set up so the player controls 1 of the families, with events like these:
Click "Family1" -> stuff happens.
But then I want to change it around so all these interactions can happen with "Family2" instead, depending on player choice while the game is running. Is there a somewhat easy way to do that, maybe by have it changing according to a global variable that says player is either "family1" or "family2"?
So far it seems there is no way to either exchange family names, or even change the contents of a family, while the game is running. So is there some other workaround?
So far all I can think of is making an identical set of code for each family, but that would be huge and complicated, not to speak of making sure they are always the same whenever I got to change something in one of them.