i am creating a AI for my fps but i want to have different target scripts?
so i am making my fps game and i want a ai to shoot me for it. so first i made a gun script fo my charachteer and ai and they both are same just some differences that should be in a ai then i needed to make a target script that activates when u get hit but i want different things to happen when ai and when i get hit and to activate tha target script there is a line in gunscript that says if (Target target = hit.transform.GetComponent)
and then the name of function which is in target script so i want to have different target scripts for ai and me first thing i thought was to rename the target script in ai and change the getcomponent in gunscript but it gives me a error cannot implicitly convert Target to the new name wich was TargetAI now i dont know how to fix this plz help
Your answer
![](https://koobas.hobune.stream/wayback/20220613002128im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Enemy walking off platform in Unity2D 0 Answers
Horror AI looks for player 0 Answers
Trying to make an enemyAI and have a few issues could I get some help? 0 Answers
AI Raycasting 0 Answers