Collision question...

Hello. When object A collides with object B, how can I store object B as a variable, so that a script attached to object A can reference a public variable in a script attached to object B? I hope that made sense (and yes, I know an easy fix would be to handle everything in the script attatched to object B, but I am wondering if this way is possible too). Thanks

You can use the argument passed to the collision/trigger function, something along these lines, I guess:

private var otherCollider:GameObject;
private var otherScript:ScriptType;

//function OnTriggerEnter(coll:Collider)
function OnCollisionEnter(coll:Collision)
    otherCollider = coll.collider.gameObject;
    scriptType = otherCollider.GetComponent(scriptType);