Finally getting to the point that I can start to call my project a game. I have an enemy that can detect the player, chase, shoot at them, take damage and die. I think I made the deathbot a little too aggressive though.
I wanted to get a slightly better screenshot, but if I stood still for long enough for the bot to get closer, it would toast me. 3-4 hits is all it takes, and it has 2 guns. I guess now I can at least start to do a little balance work. The bot probably needs to be slower and do less damage. The player also probably needs more stamina, since I was tiring out after running from it in pretty short order.
The AI also needs lots of work still. The detection right now is a simple distance check followed by line of sight check in any direction. It really needs to be a lot more intricate, with hearing the player, only performing line of sight checks in front of the bot, remembering the last place the player was seen, forgetting the player after a while, and so on. Working with AI in Unreal Engine 4 is probably the most complicated thing I've done yet, surprisingly. The behavior trees and blackboards used for AI are a little complicated and interact in even more complicated ways. At least the blueprint debugger is nice for visualizing what is happening.
And, hey, I also figured out how to do ragdolling on death and how to add particle effects as the robot takes damage.
That said, in the process I learned of yet more problems with Blender's exported FBXs and the way Unreal handles them. Unreal can automatically generate physics bodies for imported skeletal meshes, and that's great.
However, you can't manually edit them if they're exported from Blender, or else terrible things happen. I tried splitting the robot's tail up into multiple smaller bodies so it would ragdoll properly, and the model just started exploding every time the physics simulation ran.
Apparently it's caused by the bone scale being off by a factor of 100 when exported from Blender and is a known issue that nobody knows how to fix because the FBX standard and import libraries are proprietary to Autodesk. Pretty strange that Unreal can automatically generate the bodies fine, but only freaks out when you edit them. Oh well, at least the automatic generation feature worked surprisingly well once I tweaked the minimum bone size used to generate the physics bodies. And editing the joint constraints works without hosing the entire ragdoll, so that's something too.
I'm scared that trying to set up the player's ragdoll is going to cause issues though. Unreal complained that it couldn't automatically create the physics bodies when I first imported the mesh, and I really don't want to have to throw away the animations so I can rescale the skeleton in Blender, which is the only known workaround to the above issue.