How to avoid accidental OnTriggerEnter

I have several pickup items laying around in my world. This item gameobject has a box collider and a script.
I have made this gameobject into a prefab (so i have 3 prefabs usb, cd and shovel).
The script attached to it is the following :

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class PickingItemUp : MonoBehaviour {
	public Color color = new Color(0.8f,0.8f,0,1.0f);
	public float scroll = 0.05f;
	public float duration = 1.5f;
	public float alpha;
	public static GameObject guiTextNotif;
	public static bool pickedUp { get; set; }
	public string itemName;
	public bool putInInventory;
	public static bool pickedUpByNPC;
	private Inventory inventory;

	GameObject playerObj;
	// Use this for initialization
	void Start () {
		playerObj = GameObject.FindGameObjectWithTag ("player");

		guiTextNotif = new GameObject ("PickupNotif");
		guiTextNotif.AddComponent<GUIText> ();
		Vector3 pos = new Vector3 (0.5f, 0.5f, 0.0f);
		guiTextNotif.guiText.transform.position = pos;

		guiTextNotif.guiText.fontSize = 40;
		guiTextNotif.guiText.anchor = TextAnchor.MiddleCenter;
		guiTextNotif.guiText.alignment = TextAlignment.Center;

		pickedUp = false;
		guiTextNotif.GetComponent<GUIText> ().material.color = color;
		alpha = 1.5f;
		putInInventory = false;
		pickedUpByNPC = false;
	// Update is called once per frame
	void Update () {
		if (pickedUp) {
			foreach (Transform child in gameObject.transform) {
				if ( == "Item")
				if ( == "Particle")
			if (alpha > 0) {
				Vector3 temp = guiTextNotif.transform.position;
				temp.y += scroll * Time.deltaTime;
				guiTextNotif.transform.position = temp;
				alpha -= Time.deltaTime/duration;
				color = renderer.material.color;
				color.a = alpha;
				guiTextNotif.guiText.color = color;
				renderer.material.color = color;
			} else {
				pickedUp = false;
				Destroy (this.gameObject);
				Destroy (guiTextNotif);
			if (!putInInventory && !pickedUpByNPC) {
				inventory = GameObject.FindGameObjectWithTag("Inventory").GetComponent<Inventory>();
				putInInventory = true;
	IEnumerator OnTriggerEnter(Collider other) {
		playerObj.GetComponent<Animation> ().animation.Play ("pickup");
		yield return new WaitForSeconds (2.0f);
		guiTextNotif.guiText.text = "Picked up " + itemName;
		pickedUp = true;

	public static void forcePickedUpTrueForNPC(string npcName, GameObject npcObj, string name) {
		guiTextNotif.guiText.text = npcName + " picked up " + name;
		pickedUp = true;
		pickedUpByNPC = true;
	public void setItemName(string n) {
		itemName = n;

Now I have 2 main problems:
First problem is: if i have 2 of these prefab items (2 USB’s) in my world and one gets picked up, the other one will dissapear too.
How can I make sure that only the item which is picked up gets removed and the others stay?

Second question is the following: since the characters in my world are not controllable (they move themselves). Sometimes they have to move from one NPC to another NPC.
But if they “accidentaly” walk over one of these pickable items (without meaning to pick them up, they were just in their path) the item would be picked up and dissapear. I obviously don’t want this to happen.
Is there a way where I can put like a small timer on this trigger and say like “if he is after 0.5seconds still on this item he wants to pick it up”?

Thanks in advance to anyone who can help me

You should handle all “picking” in the OnTriggerEnter. Check if “other” is who is able to pick this up. Then, do that stuff in OnTriggerEnter. Since OnTriggerEnter is only on the two involved, that’s the place where the handling of this event goes. Iterating all “Items” in Update is just a bad idea, because you lost the information on which one it was that was triggered.

Will also solve the problem with NPCs. If an NPC triggers, catch it and do nothing. Keep it simple.