AI Interaction 2

-- Andrew Roberts --

Working on Enemy Movement Still, Created a Solid Waypoint based System where we can add empty objects that the Antibodies will direct themselves too before interacting with the Player.

void Start

{

transform.position = patrolPoints[0].position;

currentPoint = 0;

prevPoint = 0;

}

// Update is called once per frame

void Update

{

if (transform.position == patrolPoints[currentPoint].position)

{

if (currentPoint == 0)

{

prevPoint = 0;

currentPoint++;

}

else if (currentPoint == patrolPoints.Length - 1)

{

prevPoint++;

currentPoint--;

}

else if (prevPoint < currentPoint)

{

prevPoint++;

currentPoint++;

}

else if (prevPoint > currentPoint)

{

prevPoint--;

currentPoint--;

}

}

transform.position = Vector3.MoveTowards(transform.position, patrolPoints[currentPoint].position, moveSpeed * Time.deltaTime);

}

Working to Follow up with extra forms of implementation as well as its reaction when it finds a player character. With all of this I will round out the basics of the AI Implementation.