How to move OnTriggerEnter to Update

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class attacking : MonoBehaviour {

public GameObject exampleOne;
public GameObject exampleTwo;
public GameObject exampleThree;
public GameObject exampleFour;

public Camera camera;
public Camera camera2;

private float THEREHealth = 100;
private float THEREHealth2 = 100;
private float THEREHealth3 = 100;
private float THEREHealth4 = 100;

public Text enemyTEXT;
public Text enemyTEXT2;
public Text enemyTEXT3;
public Text enemyTEXT4;

void Start () 
{
	camera.enabled = true;
	camera2.enabled = false;

	exampleOne.name = "N1";
	exampleTwo.name = "N2";
	exampleThree.name = "N3";
	exampleFour.name = "N4";
}


void Update () 
{
	
	setenemyTEXT  ();
	setenemyTEXT2 ();
	setenemyTEXT3 ();
	setenemyTEXT4 ();

	if (camera2.enabled == false) 
	{
		enemyTEXT.enabled = false;
		enemyTEXT2.enabled = false;
		enemyTEXT3.enabled = false;
		enemyTEXT4.enabled = false;
	}
		
	if (THEREHealth < 0.1)
	{
		THEREHealth = 0;
	}

	if (THEREHealth2 < 0.1)
	{
		THEREHealth2 = 0;
	}

	if (THEREHealth3 < 0.1)
	{
		THEREHealth3 = 0;
	}

	if (THEREHealth4 < 0.1)
	{
		THEREHealth4 = 0;
	}
		
}
	

void OnTriggerEnter(Collider other)
{
	if (other.gameObject.name == "N1") 
	{
		camera.enabled = false;
		camera2.enabled = true;

		setenemyTEXT ();
		enemyTEXT.enabled = true;

		if (Input.GetKeyDown(KeyCode.P))
		{
			THEREHealth = THEREHealth - 20;
		}

		if (THEREHealth == 0) 
		{
			camera.enabled = false;
			camera2.enabled = true;	

			Destroy (exampleOne);
		}
	}

	if (other.gameObject.name == "N2") 
	{
		camera.enabled = false;
		camera2.enabled = true;

		setenemyTEXT2 ();
		enemyTEXT2.enabled = true;

		if (Input.GetKeyDown(KeyCode.P))
		{
			THEREHealth2 = THEREHealth2 - 20;
		}

		if (THEREHealth2 == 0) 
		{
			camera.enabled = false;
			camera2.enabled = true;	

			Destroy (exampleTwo);
		}
	}

	if (other.gameObject.name == "N3") 
	{
		camera.enabled = false;
		camera2.enabled = true;

		setenemyTEXT3 ();
		enemyTEXT3.enabled = true;

		if (Input.GetKeyDown(KeyCode.P))
		{
			THEREHealth3 = THEREHealth3 - 20;
		}

		if (THEREHealth3 == 0)
		{
			camera.enabled = false;
			camera2.enabled = true;	

			Destroy (exampleThree);
		}
	}

	if (other.gameObject.name == "N4") 
	{
		camera.enabled = false;
		camera2.enabled = true;

		setenemyTEXT4 ();
		enemyTEXT4.enabled = true;

		if (Input.GetKeyDown(KeyCode.P))
		{
			THEREHealth4 = THEREHealth4 - 20;
		}

		if (THEREHealth == 0) 
		{
			camera.enabled = false;
			camera2.enabled = true;	

			Destroy (exampleFour);
		}

}
}

	void setenemyTEXT ()
	{
		enemyTEXT.text = "life:" + THEREHealth.ToString ();

	}

	void setenemyTEXT2 ()
	{
		enemyTEXT2.text = "life:" + THEREHealth2.ToString ();

	}

	void setenemyTEXT3 ()
	{
		enemyTEXT3.text = "life:" + THEREHealth3.ToString ();

	}

	void setenemyTEXT4 ()
	{
		enemyTEXT4.text = "life:" + THEREHealth4.ToString ();

	}

}

@willleo10

This should fix your problem

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class attacking : MonoBehaviour
{
    public GameObject exampleOne;
    public GameObject exampleTwo;
    public GameObject exampleThree;
    public GameObject exampleFour;
    public Camera camera;
    public Camera camera2;
    private float THEREHealth = 100;
    private float THEREHealth2 = 100;
    private float THEREHealth3 = 100;
    private float THEREHealth4 = 100;
    public Text enemyTEXT;
    public Text enemyTEXT2;
    public Text enemyTEXT3;
    public Text enemyTEXT4;
    private bool PKeyPressed = false;

    void Start () 
    {
        camera.enabled = true;
        camera2.enabled = false;
        exampleOne.name = "N1";
        exampleTwo.name = "N2";
        exampleThree.name = "N3";
        exampleFour.name = "N4";
    }

    void Update () 
    {
        PKeyPressed = Input.GetKeyDown(KeyCode.P);
        setenemyTEXT  ();
        setenemyTEXT2 ();
        setenemyTEXT3 ();
        setenemyTEXT4 ();
        if (camera2.enabled == false) 
        {
            enemyTEXT.enabled = false;
            enemyTEXT2.enabled = false;
            enemyTEXT3.enabled = false;
            enemyTEXT4.enabled = false;
        }

        if (THEREHealth < 0.1)
        {
            THEREHealth = 0;
        }
        if (THEREHealth2 < 0.1)
        {
            THEREHealth2 = 0;
        }
        if (THEREHealth3 < 0.1)
        {
            THEREHealth3 = 0;
        }
        if (THEREHealth4 < 0.1)
        {
            THEREHealth4 = 0;
        }
    }

    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.name == "N1") 
        {
            camera.enabled = false;
            camera2.enabled = true;
            setenemyTEXT ();
            enemyTEXT.enabled = true;

            if (PKeyPressed)
            {
                THEREHealth = THEREHealth - 20;
            }

            if (THEREHealth == 0) 
            {
                camera.enabled = false;
                camera2.enabled = true;    
                Destroy (exampleOne);
            }
        }
        if (other.gameObject.name == "N2") 
        {
            camera.enabled = false;
            camera2.enabled = true;
            setenemyTEXT2 ();
            enemyTEXT2.enabled = true;

            if (PKeyPressed)
            {
                THEREHealth2 -= 20;
            }

            if (THEREHealth2 == 0) 
            {
                camera.enabled = false;
                camera2.enabled = true;    
                Destroy (exampleTwo);
            }
        }
        if (other.gameObject.name == "N3") 
        {
            camera.enabled = false;
            camera2.enabled = true;
            setenemyTEXT3 ();
            enemyTEXT3.enabled = true;
            if (PKeyPressed)
            {
                THEREHealth3 -= 20;
            }
            if (THEREHealth3 == 0)
            {
                camera.enabled = false;
                camera2.enabled = true;    
                Destroy (exampleThree);
            }
        }
        if (other.gameObject.name == "N4") 
        {
            camera.enabled = false;
            camera2.enabled = true;
            setenemyTEXT4 ();
            enemyTEXT4.enabled = true;
            if (PKeyPressed)
            {
                THEREHealth4 -= 20;
            }
            if (THEREHealth == 0) 
            {
                camera.enabled = false;
                camera2.enabled = true;    
                Destroy (exampleFour);
            }
        }
    }

    void setenemyTEXT ()
    {
        enemyTEXT.text = "life:" + THEREHealth.ToString ();
    }
    
    void setenemyTEXT2 ()
    {
        enemyTEXT2.text = "life:" + THEREHealth2.ToString ();
    }

    void setenemyTEXT3 ()
    {
        enemyTEXT3.text = "life:" + THEREHealth3.ToString ();
    }
    
    void setenemyTEXT4 ()
    {
        enemyTEXT4.text = "life:" + THEREHealth4.ToString ();
    }
}