Horror Engine Help with A.I

Hey guys, I’m new to Unreal Engine and Im far from well versed as I started tinkering with it to Impress my kid.

I’m using UE4 and I’m working with Horror engine reloaded.

I’m literally stressed and consumed with a problem that I’m having with the A.!.

My A.I Character (default name AIbBase in the editor) was not moving or roaming but would attack and kill me if i walked close enough to it even while standing still.

I later set a Nav Mesh and used the already included Patrol Path and target points that came with the templates. It was fine and dandy but would stop on the last target point and wouldn’t attack me anymore. I went into the Base_BT Behavior Tree and and made some adjustments to opt for Random location Roaming over the targeted type.

Under Patrol Area I set Key Query to “Is Not Set” and I set Random Location Key Query to “Is Set”. This made my AI Character do random roams which was excellent but the Character will walk right by me and dosen’t see me or attack me.

What can I do? Sorry for being new and most likely making this question hard to decipher and to diagnose. Any help and patience would be greatly appreciated.

Thank You guys.

Hi,

May you be great.

So Behavior tree executes top to bottom and left to right, which meas if you wants a given node have priority on top of another it have to be one top-left of other.

So here is the thing, each node in in behavior tree has an unique id (number on its top right), the lower the number, the lower the priority.

Another important stuff is the Observe Abort, the actual node has his condition satified, so you can abort he lower and execute the current high prioty.

So in order to your enemy attack your hero, the attack should be in high priority than patrol, and if the attack condition (e.g distance, sight range, etc.) is satisfied you can abort lower and attack.

Hope this help you.

Hey @ChillFamX!

I’m thinking it might be an issue with setting CanSeePlayer, as it should automatically reset the tree when that variable changes, and use the “ChasePlayer” branch.

Does it go down that branch at all, at any time? Check that first, then if that doesn’t give you any ideas then come back with info of how you’re setting that Boolean. Keep in mind, though, that this isn’t a forum for Horror Engine Reloaded, so you may have to show and explain more than you would to someone very familiar with that template. :slight_smile: