Hi guys, i am currently developing a University Project. And i got the task to developing the AI. So far, i followed 's tutorial and all works fine. But of course, i need to develop it and need some help from you, the community. I’m gonna write different threads for my question. If any of you is a AI enthusiast and willing to teach me here and there, i am really grateful if we can know each other and keep contact more often !
So now straight to my question :
How does AI recognize dead from the actor?
So far in my project, the main character can die from AI attack projectiles. After the main character died, the screen will turn grey (signaling that you are dead) but somehow the AI keep shooting after it dead, because it’s still near the character. (The AI has “Detect enemy Services”, when the main character got near, he will be shot).
My assume is that the AI still shoot the main character because they didn’t notice the main character’s death, instead they noticed it is still a mesh/actor that they still shoot.
Here is my “detect enemy” service from Behavior Tree :
Hi @,
thanks for replying! But where should i change that? making nodes in player blueprints / in botcharacter blueprints? or there’s some option in detail panels that i can tick/untick ? (I currently have an isAlive function in Player’s Character BP)
You would make the change in your player pawn. Have a custom event that changes visibility to ignore. Once your player reaches 0 health, run the custom event function. I’m assuming you are using Health as your death indicator, which typically means you have an “event Hit” node at some point. This would be a great place to run a branch checking if your player’s health <= 0.