top of page
Battle Blocks
FJ Hagen
Game Programmer
Shooter Prototype
Shooter Prototype
Shooter Prototype
![Shooter Prototype](https://static.wixstatic.com/media/5a0452_200292a269f94117a787849507b1879df002.jpg/v1/fill/w_760,h_428,enc_auto/file.jpeg 1x, https://static.wixstatic.com/media/5a0452_200292a269f94117a787849507b1879df002.jpg/v1/fill/w_1520,h_855,enc_auto/file.jpeg 2x)
Search video...
![Sound and UI](https://static.wixstatic.com/media/5a0452_200292a269f94117a787849507b1879df002.jpg/v1/fill/w_247,h_139,enc_auto/file.jpeg 1x, https://static.wixstatic.com/media/5a0452_200292a269f94117a787849507b1879df002.jpg/v1/fill/w_493,h_278,enc_auto/file.jpeg 2x)
Sound and UI
00:07
Play Video
![Enemy AI](https://static.wixstatic.com/media/5a0452_594d3d5e51ba429cb0319e775965e963f002.jpg/v1/fill/w_247,h_139,enc_auto/file.jpeg 1x, https://static.wixstatic.com/media/5a0452_594d3d5e51ba429cb0319e775965e963f002.jpg/v1/fill/w_493,h_278,enc_auto/file.jpeg 2x)
Enemy AI
00:18
Play Video
Summary
This is the second project I've completed primarily with C++ in Unreal. I learned things such as setting up enemy AI and implementing Blueprint nodes with C++. I have some code samples below as well as my behavior tree for the enemy AI.
Shooter Character
Gun
Behavior Tree
![](https://static.wixstatic.com/media/5a0452_7e8182e000a04231af8bb8a3856af396~mv2.png/v1/fill/w_47,h_30,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/5a0452_7e8182e000a04231af8bb8a3856af396~mv2.png)
This is the behavior tree for my enemy AI. I'll summarize what's happening in plain English. If the enemy can see the player, it moves to the player's location and shoots every second. If the enemy can't see the player, but knows the location where it last saw the player, it moves to that location. If it can't find the player after getting to the last known location, it goes back to its original position. The values that determine which action the AI takes are set with C++, as shown below.
Shooter AI Controller
Shoot Task
Clear Blackboard Value
bottom of page