Checking if Combat target is enabled does nothing

So I tried putting it everywhere, I checked in every part of the combat target script where it was said to just say if !enabled then return false. Still showed attacking icon, still could dmg enemies. After fiddling around more I finally tracked it to the point that the only way I can make a non attackable npc is to go into the fighter can attack method and check to see if the fighter is not enabled and to return false there. That seemed to do it. I don’t know if it was my version of unity (2022.1.20f1) or what but just thought I would comment on this. I even put a debug.log on the combat target and it did show that it was getting to that part just did not toggle off my ability to attack it. (though after finishing the lecture this may be because of script order as well… meh lol)

Privacy & Terms