Im having problems with Target Reached

I’ve attempted to write a conditional statement to say that if TargetReached is true, then set another integer to a value, but for some reason it does not work.

I’ve inherited the AIPath class and I am still stuck on this issue.

This is more or less the code.

public class Player : AIPath {

public int status;

public void Update {

if (TargetReached == true)

{

status = 1; 

                }

         }

}

It is worth nothing, I have both the AIPath script and this Player Script attached to one game object.

Hi

You are redefining the Update method which the AIPath method is already using. This will cause Unity to only call your Update method but it will not call the Update method in the AIPahth script, so it will not be able to do anything.
Instead you should override the Update method:

protected override void Update () {
    base.Update();
    // Your code here
}

Also. Since you are inheriting from the AIPath script you should only have the Player script attached to the GameObject since the Player script is just an AIPath script with some additional information.

Oh my God! Thank you so much for your ultra quick response! It absolutely worked!