Horror Engine Basic AI Addon
This AI was made by MsVelsina to be a Jumping off point for you to get a basic patrolling/Attack AI in your Horror project.
This is free to use in your projects.
This comes with a Basic AI blueprint character and basic BT Blackboard, Controller and Example level. I’ll be going over the basic of how
to use the addon and set the Ai up for your project.
For more tutorials addons or to request please join the Horror Engine community discord [Link]
Extract the Addon into your project’s Content folder
BASIC SETUP
The AI is currently setup to choose a random Target point then It'll run through each point in order making a predictable path if you want
this you can keep the BT as is but if you want the AI to choose a random point to travel to each time you can change it here
“AI->MasterAI->MasterAI-> BasicTree” you should get this window
To change it to a Random point simply click on the bottom dark part of the “Sequence” node and then the top dark part of the “Get random
target” node
Then hold ALT and click on the arrow connecting the “Sequence” to “GetNext Target”
The BT should now look like this.
Now the AI will be less predictable.
When you clock on the Basic AI character you'll notice 3 Variables in default
The attack anim (can be replaced with any animation on the Skeleton you're using)
Walk Speed
Run Speed
These can be changed to anything but I would recommend setting the run to a little bit under the run speed for your player and find a good
walk speed to match the walking animation for your model.
Setting up Patrol points!
For the patrol points I like to use target points in the AI I set it up to find any target point tagged as “AI_Target”.
To set this up drag the target point into your map
Then in the details panel for the TargetPoint scroll down until you find the Actor section, expand it by clicking the tiny down triangle.
Under “Tags” click the + to get a new blank field 0
In that field type AI_target. Now when you start the level the AI will find this point and add it to its array of possible move to locations
You can also duplicate this point which will carry over the tag as well
Make the AI Hurt you
There are many ways to do this so I’m going to show what I know as the most simple method to get this running.
Under “HorrorEngine->Blueprints->UsableAssets->PortalsAndTriggers” you’ll find a damage trigger
Drag that into the world and try to place it as much on the AI as possible
In the Collision Settings tab on the trigger you'll want to set the following (X=50,Y=50,Z=100) this will have the AI hurt you if you get within
one map unit of its face
Next we’re gonna make sure the trigger moved with the AI to do this in your world outliner you're gonna find the trigger and drag it to your
AI and place it inside your world outliner should look like the this now.
Congrats you now have an AI that will roam to points that use setup, hunt you down and if it gets close will hit you for 15 Damage every 3
seconds.
To change the Hit rate and amounts go into your Details panel for the damage trigger and find the Damage area settings there you can
chose the hit rate and amount