Ai controller calls start twice

So i just put the archer in the game. my problem is that the ai controller on all enemies will get the player by tag at start but then do it a second time on start and they for some reason decide to pick my guard1 or my new archer class the second time. I tried to delete my .sav and one time it worked becuase all enemies decided to find player the second time instead of the first time so it worked. but now they all just find the archer. help?

    private void Start() 
    {
        player = GameObject.FindWithTag("Player");
        print("im " + gameObject + " my target is " + player);
        health = GetComponent<Health>();
        mover = GetComponent<Mover>();
        fighter = GetComponent<Fighter>();

        gaurdPosition = transform.position;
    }

WAIT i made a mistake by thinking unique identifieir and tag are the same. problem solved, but start still gets called twice???

Hi @CodeWizardAustin,

How are you getting on with this? If you still need help, in which course and lecture are you?

1 Like

yeah i think i figured it out

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms