How do I add variables to objects?

Hi,
I have some 3D objects that I would like to add variables to. I have a ball that I want to add the variable name ‘target’ to so that it chases after a certain 3D object when I assign that object to the name ‘target’.

What I usually do to work around the problem of not being able to communicate between 2 different java scripts on 2 different objects is assign a vector coordination to an empty object which I use as a third party to communicate between 2 different objects where I’ll use 1 java script to assign valuse and later use another java script to retrieve the x, y or z values from the empty object and I know there is a better way to do communication because so far I can not work with strings when I do this, only numbers and 3 at a time per empty object (x, y and z). What else is there I could do?

Thank you,
Michael S. Lowe

Sounds like you’re having some major problems.
What you’re doing is way over complicated to communicate a few variables between gameobjects.

http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Objects.html