Basically I’m trying to test it out first. For the test I’m pushing a blue cube into a yellow cube to activate a green cube. I’ve created 2 scripts for each object to destroy once they collide. But I’m really stuck on how to make one object activate another on trigger. I can do players easily but I’m stuck on this now. I’m still learning all of this at the moment been about 2 months into it. So any good info on how to do this better will be great thanks.

using UnityEngine;
using System.Collections;

public class ActivateGreen : MonoBehaviour 
{
	void OnTriggerEnter(Collider other)
	{
		if(other.gameObject.tag == "Blue")
		{
			other.gameObject.SetActive(false);
		}
	}
	
}

and here’s the second script

using UnityEngine;
using System.Collections;

public class BlueDestroy : MonoBehaviour {

	// Use this for initialization
	void OnTriggerEnter(Collider other)
	{
		if(other.gameObject.tag == "Yellow")
		{
			other.gameObject.SetActive(false);
		}
	}
}

You code seems to be correct please provide more details about the scene and hope you have checked IsTrigger for the colliders in the inspector

I guess that you want to create a game where u push two objects of different colors together to get a new one based on the 2 colors of the collided objects. A fusion look-a-like game with colors. Assuming that you want to create e.g. the green cube at the cords of the collions of the 2 other cubes, yellow and blue, you could use a Manager class(singleton-pattern) like its on the wiki http://wiki.unity3d.com/index.php/Singleton .

Than in the manager class you have a method for instantiating a cube of a different color based on the two collided cubes.

e.g.

using UnityEngine;
using System.Collections;

public class Manager : Singleton<Manager>
{
	protected Manager () {} // guarantee this will be always a singleton only - can't use the constructor!
	
	public GameObject greenCube;
	public GameObject blueCube;
	public GameObject yellowCube;
		
	public void InstantiateNewCube(MyCubeClass cubeOne, MyCubeClass cubetwo, Vector3 position)
	{
		if(cubeOne.color == "blue" && cubetwo.color == "yellow")
		{
			Instantiate (greenCube, position, Quaternion.identity);
		}

		//you need more methodes here for each fusion scenario of colors
	}
}

Than you need a MyCubeClass with a variable which is storing the actual color. The MyCubeClass should be attached to the cubes. Additional you have to figure out the collision point or just use the position of one of the 2 cubes for the position of the new Cube. You can than call the method from everywhere using e.g

void OnTriggerEnter(Collider other)
{
     //get the components MyCubeClass of the two collided cubes(eg. use GetComponent<MyCubeClass>())
     //figuring out the position for the new cube
     Manager.Instance.InstantiateNewCube(cubeOne, cubetwo, newPosition);
}

I didn’t test it but thats the main idea. Using a gamePool would be even better to save performance instead of instantiating all the time a new cube.

Can you guys help, I basically want to collide 2 game objects when drag to initiate the third one, for example when I drag the pasta on plate these two object will destroy then pasta outcome will initiate…,Can you give a sample for this one ,like for example i have plate and pasta, of these 2 collided the pasta outcome will show.