I have an object that the player must hit, the object needs to be hit 3 times for something to happen, I want to be able to have several of these objects in my scene.
The problem I am having is referencing this hit value from another script.
The object I am hitting has a script to detect collisions, while another object has the scripts that are controlling its behaviour. I need to be able to get the hit counter from the collisions script.
asked Aug 01 '10 at 11:18 AM
This is covered in the docs: http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Objects.html
answered Aug 01 '10 at 11:53 AM
Ok, so I have tried to work with this script to get a variable out of another script...
Graphics is the object GUIButtons is the script test is the variable in the script I want to get the value of
nothing I am doing is working. ANY help would be great!