I'm a little new to Construct 2 and I'm trying to create an evolution simulator that allows creatures to evolve new body features, and then reproduce and pass these features to their children.
I have one creature sprite and each instance spawns with the variables Front_Limb, Back_Limb, Head, and Tail, all set to the default 0. Each instance then generates a random number between 0-10 and then adds 1 to one of the variables if it corresponds with the generated number (0:Body, 1:Tail, 2:Front Limbs, 3:Back Limbs 4:Head, 5-10 are blank) allowing the creature to randomly evolve new or improved features when it's born. When two creatures collide they then spawn a new instance of the creature which then goes through the same process of evolving new features.
The part I'm having trouble with is getting the creatures to inherit their parent's features. For example, when a creature with a level 1 tail spawns a new creature I want the new instance to inherit the T1 variable and then either evolve a new feature or add to the inherited one giving it a level 2 tail.
Currently I have it set up so that when the two collide, the new one sets all its variables in the format:
CreatureCore is overlapping CreatureCore & CreatureCore is playing animation "Egg": CreatureCore Set Body to CreatureCore.Body, CreatureCore Set Tail to CreatureCore.Tail, and so on....
I've looked through the manual and can't find anything on sharing variables except for in families and those apply the variables to all instances, not one at a time. Does anyone know if there is another way to pass variables between individual instances?
Any help would be wonderful and greatly appreciated.