Using Monster AI Kit with Horror Engine.


In this article I’m going to show you how to integrate the monster AI toolkit with the Horror engine, the monster AI kit can be easy integrated with other systems, you can check the the documentation to know how to to implement the kit into your system.
Here we’ll talk about the issues you will face with Horror engine. Most of these are related to damage being applied either to the monster or to the Horror Engine’s player character. This happens because the Horror Engine system is based on the “Use” class and typically makes casts to it, which causes both cases to fail.

Let’s begin with applying damage to the monster

To understand the issue open a blueprint file called “Horror Engine” in “HorrorEngine/Blueprints/Player”

Then, in the left corner find a function called”shootTargetCheck”

And locate this Cast to “use” on the right:

This is the reason of the issue because this cast will fail and the damage will not apply to the monster, to fix it make another cast to “Monster NPC” after the cast to “use” fails

And then use it to apply point damage to the monster if the cast succeeded

Connect the Hit from direction and the damage causer from “Get Player Character”, then split the hit info to connect it with the info you need from the gun line trace

The bone name and location are the most important

Now if you play you can apply damage to the monster using the horror engine gun!

you also may need to connect this node to continue the other horror engine logic

Taking damage from the monster

to receive damage from the monster you need to receive it the same way in horror engine damage system, so locate to “HE_character” in “/HorrorEngine/Blueprints/Player”

Open it and add “Event point damage”, get Actor of class “Horror Engine” and use it to access the Get Damage function and connect the damage value to it

You can also split the Event settings to customize the damage effect

Now you can receive damage from the monster with the horror engine effect!

Some Polishing

You will notice that the monster overlap with the horror engine player character It’s like trying to go through the player, you can fix this by increasing the “reach distance” in the monster data asset and increase the range of the ability

Conclusion

This article includes solutions that could not be the best solutions you can fix these issues with different ways but the main purpose is to show you the reasons of the issues and why it’s happening.


Posted by

Vitamine-C Avatar