Finally, I have work to show again!
|
Oh it feels good to be back working in Unreal rather than grinding away at the report I’ve been doing for the last couple of weeks. During the last two days i have been working on very simple AI behavior to use for enemies by this Friday. It’s coming along but it has had its issues. I started by following the quick start guide from Unreal’s website, (found here: https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/index.html) and for the last two days i have made a total of three(3!) versions of the same AI. The first version was a test run in a separate folder with _Test at the end of every file name. The AI worked well enough but had two issues. 1. The bots would walk back and forth between the spawn point and the player’s last known position when losing sight of the player. 2. one of the functions kept returning a error message. Being unable to find the cause of these issues i decided to remake the AI system hoping i had just missed some minor detail. I must have because the second version of the AI displayed no error messages but had another problem: For some reason it would not set the home location when being spawned which caused it to never go back to its initial location after losing sight of the player. After spending half of today trying to figure out a way to set the value but eventually gave up. The third version has so far worked just as intended. The AI follows the player and returns to the initial location a short while after losing sight of the player. Next i added another set of nodes to the Behavior Tree which was called when the bot was close enough to the player, all this function did initially was type out ATTACK! on the screen every time it was called. I wanted a better visual feedback so i made the bot rotate instead of write out the text. The result was pretty satisfactory. Finally i added a Wait node to be ran after the attack and started thinking about how to make the attack actually hurt the player. I have some good ideas but it’s getting late so hopefully i’ll get it done tomorrow. |
