Message actuator/sensor in conjunction with python.

Okay, I need to pass data from object A to one of it’s children, object B. Simple, right? Well I also need to be able to keep copy-pasting A and B* while having each set work independently of all others.

it says here that I can access the body of messages** through python, is there some way that I could use this?

*.addObject(A), since B is a child, and will be created as well.
**Message actuator

‘passing data’ is a bit vague. What kind of data and why?

The easiest way to control one object from another is selecting both objects and connecting logic bricks between the two of them. Make sure they are parented to a common object, otherwise bad things will happen. Add the parent using an add object actuator and those logic brick links will stay intact.

Well, I reckon you could just directly enter it into the second object. B is the child right?

So what if we do something like:
In the parent (object A):

child = own.children[0]
child['information'] = 'This is a string, but could be numbers, dictionaries any python datatype you like'

In the child (object B):

if 'information' in own:
    passed_info = own['information']
    del own['information']


Set property

Always - Copy property from parent

Good for some things,

you can also have

if message subject equals “Copy”-----python

own[‘data’] = sender[‘data’]

I have a system that sends data with rays, but it is not the best for parented systems…

I never knew you could access children like that sdfgeoff .
I’ll try this tomorrow morning (it’s 11:30 for me)

Thanks all!

it worked.