Ai home location

I’ve recently followed the basic AI random movement tutorial produce by Epic A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

I was wondering how you would get the pawn to record its home position when it moves into a trigger volume. I’ve tried adding a Overlap event in the pawn that posts to the blackboard to update a vector variable (named:home location) but when it runs it crashes and I loose everything.

I assume you aren’t supposed to post to the blackboard from an actor as I had so much trouble trying to link set blackboard value as vector. I thought it might be added in the behavior tree but I have no idea where I would have it.

You should be fine sending data to blackboard from anywhere. Just make sure you use proper blackboard function, meaning DO NOT disable context sensitivity when looking for blackboard functions. Get access to AI’s blackboard component and then call function on that.

Of course I might be mistaken regarding the cause of your crash. If I am please post a screenshot of the blueprint that’s crashing. Any other additional info would be helpful as well.

Cheers,

–mieszko

Since I’ve got back from work I’ve tried various ways to try to access set blackboard value as vector using context sensitive to no avail.

The only option I’ve managed to find it set members in BlackboardKeySelector but I have no idea how that works.

I assume because of this that is why it crashed, as I was creating in without context and plugging everything in.

I just tried it and had no problem using blackboard outside of Behavior Tree nodes:

–mieszko

Hmm I’ve tried that and I get no crash but the value is invalid, is that from a pawn blueprint or level blueprint?