AI Adventures #2 - Killing an AI in "Forgotten Memories" - By Michael Marquez

    

                                                 

Today's problem is getting data to the Behavior Tree. Here is what I learned today. 

First, we head over to our folder and create an Interface class, we will call this PBI_AI.

open it and set up a new function call it On Player Death. 


Next, we head back to the BT and add a new key call this is IsPlayerDeadBT. We will be using this later. 

next lest add a bit of logic to our AI controller for the behavior tree and create a new function called IsPlayerDead for our bool key in the BT.

Now for the fun part, Logic.

Head back to the Enemy_BP and add an event with the exact same name function from before. Now we do some blueprint magic and bam we have a bool to shoot back to our behavior tree. 


Finally, we create a bit of logic to check our health bar and if the enemy is dead. Simple right? And now we have an enemy that can die and will stop trying to kill you every chance it gets. 





Comments

Popular posts from this blog

Creating the door system in "Forgotten Memories"

Puzzle Level Design and Inventory UI

Level Streaming in "Forgotten Memories"