public void paintUnit(Graphics g)
	{

		Image person = enemyWalkingU[3];


		if(killed == true || DungeonGame.mainPanel.panel.chatActive == true)
		{
			preventMovement = true;
			if(killed == true)
			{
				person = guardDead;
				aware = false;
			}
		}
		else
		{
			AI();


			if(count >= 10 || keyheld == false)
			{
				count = 0;
			}

			if(direction.equals("R"))
			{
				if(attack == true || defend == true)
				{
					if(attack == true)
					{
						if(attackCount == 0 || attackCount == 1)
						{
							person = enemyWalkingR[5];
							attackCount++;
						}
						if(attackCount == 2 || attackCount == 3)
						{
							person = enemyWalkingR[10];
							attackCount++;
						}
						if(attackCount == 4)
						{
							person = enemyWalkingR[0];
							attackCount = 0;
							initiateBattle(g);
							attack = false;
						}
					}
					else
					{
						person = enemyWalkingR[11];
					}
				}
				else
				{
					if(keyheld == true)
					{
						person = enemyWalkingR[count];
					}
					else
					{
						person = enemyWalkingR[3];
					}
				}

			}
			if(direction.equals("L"))
			{
				if(attack == true || defend == true)
				{
					if(attack == true)
					{
						if(attackCount == 0 || attackCount == 1)
						{
							person = enemyWalkingL[5];
							attackCount++;
						}
						if(attackCount == 2 || attackCount == 3)
						{
							person = enemyWalkingL[10];
							attackCount++;
						}
						if(attackCount == 4)
						{
							person = enemyWalkingL[0];
							attackCount = 0;
							initiateBattle(g);
							attack = false;
						}
					}
					else
					{
						person = enemyWalkingL[11];
					}
				}
				else
				{
					if(keyheld == true)
					{
						person = enemyWalkingL[count];
					}
					else
					{
						person = enemyWalkingL[3];
					}
				}
			}
			if(direction.equals("D"))
			{
				if(attack == true || defend == true)
				{
					if(attack == true)
					{
						if(attackCount == 0 || attackCount == 1)
						{
							person = enemyWalkingD[0];
							attackCount++;
						}
						if(attackCount == 2 || attackCount == 3)
						{
							person = enemyWalkingD[10];
							attackCount++;
						}
						if(attackCount == 4)
						{
							person = enemyWalkingD[5];
							attackCount = 0;
							initiateBattle(g);
							attack = false;
						}
					}
					else
					{
						person = enemyWalkingD[11];
					}
				}
				else
				{
					if(keyheld == true)
					{
						person = enemyWalkingD[count];
					}
					else
					{
						person = enemyWalkingD[3];
					}
				}
			}
			if(direction.equals("U"))
			{
				if(attack == true || defend == true)
				{
					if(attack == true)
					{
						if(attackCount == 0 || attackCount == 1)
						{
							person = enemyWalkingU[0];
							attackCount++;
						}
						if(attackCount == 2 || attackCount == 3)
						{
							person = enemyWalkingU[10];
							attackCount++;
						}
						if(attackCount == 4)
						{
							person = enemyWalkingU[5];
							attackCount = 0;
							initiateBattle(g);
							attack = false;
						}
					}
					else
					{
						person = enemyWalkingU[11];
					}
				}
				else
				{
					if(keyheld == true)
					{
						person = enemyWalkingU[count];
					}
					else
					{
						person = enemyWalkingU[3];
					}
				}
			}
		}


		if(preventMovement == false)
		{
			updatePosition();
		}

		g.drawImage(person, x, y, DungeonGame.frame);

		if(aware == true && killed == false)
		{
			g.drawImage(exclamation, x + 23, y - 7, DungeonGame.frame);
		}
		

		if(keyheld == true )
		{
			count = count + speed;
		}
		else
		{
			count++;
		}
	}