First time posting, I've been reading the forums recently and using the excellent 'Function' plugin. I'm hung up on a process of trying to implement code re-use. I'm using (as a test) two objects 'Man' and 'Woman' within the 'Human' family. If you look at my existing code you'll see that I can very easily click on one of those two objects and retrieve their respective 'Age' variables, however I can only seem to do this by having individual functions within each click event. I'd love to further optimize this to allow clicking on any object within a family to bubble up their instance variables, however it seems that data retrieval cannot flow that way.
With this issue I now would like to click any object within the family and be able to use the object name as a reference in the function plugin, such as "On click 'Human' " > send object "Man" as a parameter in function so I can write a generic method that could be utilized by any object within 'Human' based off of the initial object I clicked on, again trying to re-use code as much as possible.
Any help would be appreciated, I am really stumped, I know there's got to be a solution but I cannot see it!
Thanks in advance!
C2 Capx file