Noobie Q: How do I add a script to check the transform Y position of a GameObject?

I just started with Unity and was wondering how to add a script so that it would check the Y position of a game object and accordingly update the score. I made a prefab of the gamobject and duplicated about 10-12 copies.
What is the fastest way to check the Y transform of all of them at once and if say Y<=1.5 for each, the Game is over.

You’ll have to put a little bit of structure in place I think.

If you have a “game manager” type of script which holds all the participating gameObjects in an array you can have it check through each one each frame and see if they meet whatever criteria…

http://docs.unity3d.com/Documentation/ScriptReference/Array.html

getting at the y position component is simply:

transform.position.y

edit:

you could also use Tags and getting all the tagged gameObjects as an array

Thanks! I ended up copying the script to each object…worked well but tagging seems much faster. I will try that too.