Hey! Sorry for taking so long to get back. I very much appreciate the response (and the time investment!)
I’ve simplified the scene to exemplify my problem specifically, and I’ve also uploaded a web player as requested:
http://web.me.com/sophoro/
To recap: I’m trying to pass variables to scripts on instantiated objects that aren’t directly attached (i.e. telling an recently spawned rock object that it can stop it’s motion on the X by way of an FixedUpdate function on an unrelated object.) I hope that makes sense. 
I’ve commented out most of the messaging code I’ve been working with; it’s current iteration, anyway.
The scene hierarchy consists of:
-
SeeSaw
-
ClickTrigger
-
ExitTrigger
-
Fulcrum
-
Rock
-
Ground Plane
-
RockSpawnRight
There is a “master” script attached to the main camera:
using UnityEngine;
using System.Collections;
public class GameManager : MonoBehaviour {
public static GameManager SP;
private GameObject rockHolder;
private GameObject rockSpawnPoint;
private GameObject boardObject;
private float secsSpawn;
public Board boardHasFired;
public Rock rockHasMotion;
void Awake () {
SP = this;
}
// Use this for initialization
void Start () {
rockHolder = GameObject.Find("Rock");
rockSpawnPoint = GameObject.Find("RockSpawnRight");
boardObject = GameObject.Find("SeeSaw");
//boardHasFired = boardObject.GetComponent<Board>();
//rockHasMotion = rockHolder.GetComponent<Rock>();
secsSpawn = Random.Range(1,5);
}
// Update is called once per frame
void Update () {
}
void FixedUpdate () {
if (secsSpawn <= 0) {
GameObject rock = Instantiate(rockHolder, rockSpawnPoint.transform.position, rockSpawnPoint.transform.rotation) as GameObject;
Destroy(rock, 15.0f);
secsSpawn = Random.Range(1, 5);
Debug.Log(secsSpawn);
} else {
secsSpawn -= Time.deltaTime;
}
}
}
The ClickTrigger is an empty GameObject which sits atop the closer (to the camera) end of the SeeSaw. It has a rigidbody, a box collider and a script attached:
using UnityEngine;
using System.Collections;
public class ClickTrigger : MonoBehaviour {
public float forceStrength = 20.0f;
private bool applyForce = false;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnMouseOver() {
if (Input.GetMouseButtonDown(0)) {
applyForce = true;
} else {
applyForce = false;
}
}
void OnMouseExit() {
applyForce = false;
}
void FixedUpdate() {
if (applyForce) {
rigidbody.AddForce(new Vector3(0,-1,0) * forceStrength, ForceMode.Impulse);
//GameManager.SP.boardHasFired.hasFired = true;
}
}
}
The ExitTrigger is another empty GameObject, sitting on the opposite end of the SeeSaw. It contains a box collider set as a trigger, and has this script attached:
using UnityEngine;
using System.Collections;
public class ExitTrigger : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerExit(Collider collider) {
// if ((collider.tag == "Rock") (GameManager.SP.boardHasFired.hasFired == true)) {
if (collider.tag == "Rock") {
collider.rigidbody.constraints = RigidbodyConstraints.None;
//GameManager.SP.rockHasMotion.motion = false;
//GameManager.SP.boardHasFired.hasFired = false;
collider.rigidbody.velocity = new Vector3(Random.Range(-10,10), collider.rigidbody.velocity.y * 1.0f, -20.0f);
}
}
}
The RockSpawn object is an empty GameObject, and just acts as a translate to point for Instantiated Rocks.
This is the script attached to Rock objects:
using UnityEngine;
using System.Collections;
public class Rock : MonoBehaviour {
public Vector3 speed = new Vector3(5,5,0);
public bool motion = true;
public bool rockLaunched = false;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void FixedUpdate () {
if (motion == true) {
rigidbody.MovePosition(rigidbody.position + speed * Time.deltaTime);
}
}
}
And finally, there is another trigger collider sitting above the ground plane, with this script attached:
using UnityEngine;
using System.Collections;
public class HaltMotion : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter(Collider collider) {
collider.rigidbody.velocity = new Vector3(0, 0, 0);
collider.rigidbody.useGravity = false;
collider.gameObject.GetComponent<Rock>().motion = false;
}
}
Thanks again in advance for any advice, comments, complaints, flogging, etc.!