top of page

Final update

For the final update I want to talk about the AI death function and re-spawn. This has been particularly challenging because if I destroyed the AI actors then I would not be able to keep information such as patrol points. So instead of destroying the actors I deactivated them like I previously did with the return to base function, however when they are reactivated they would sometimes be running the wrong behavior tree to the alert state. It has taken relentless debugging to get right but I have it as close as I can get it before submission. There is a dilemma with last minute bug fixes which has had me weighing up leaving them in the game, verses fixing them and possibly breaking something fundamental to the project.

When Ai death is called, all the the bools involving states are set to false to make sure the AI does not retain these after respawn. They are then un-possessed to stop the controller running any behaviors and a death animation is played.

After a short delay to compensate for the death animation, the AI character is teleported (While deactivated) back to the AI spawn point. I made sure to put the AI animation mode back to its original blueprint after the death animation is complete, to make sure that they will move normally again. Once this process is complete the "Switch AI to search" Function is called in called in the game mode which loops through all the AI characters and checks if they can see the player or they are dead.

If the branch is true then the AI will be switched to search, which will call the respawn depending on if the AI is dead or not. A similar process is also in place for if the AI dies in alert mode. Its quite a elaborate system which has been riddled with bugs, but It is in a workable state.

Final issues

A final issue that I could not fix is a build issue with the AI cover system. This is disappointing because this is one of the areas that I spent most of my time in. I think it's an issue with referencing somewhere in the project that just won't carry over when the project is built or played using standalone game. However, The EQS and other behavior's still functions in a built project, and it all functions perfectly when in played in editor. If I had more time I would make a new project and try to transfer everything over to see if it resolves the issue. I already tried copying all blueprints related to the cover system, from the character over to the AI blueprint but This didn't fix the bug.

Overall I am happy with how the project has gone. It has been challenging but I have covered all of the criteria and learned a lot of new skills from this experience.

Finished product


Recent Posts
Archive
bottom of page