Get Actor from Blackboard Key (Type: Object, Base Class: Actor) after setting a Actor value?

Aleeph
Thu, 09 Nov 2023 16:16:08 +0000
AI

Hi!
I’m having trouble getting an actor from a AI Blackboard key. Any ideas?

My objective: Able to set an actor in the blackboard and get it for different AI tasks.

1. The blackboard key is of type is Object and base class Actor (see image1).

2. I can successfully set the keys value as an Actor (see image2). Unreals already existing task MoveTo moves the AI to the Actor, so the “set” seems to work.

3. But when I try to get/read the blackboard keys value I can only get the Object and not the Actor (as far as I know). And many functions/nodes needs an Actor for input, not an Object.

Any ideas? Or should I just store the value on the actual AI blueprint and cast to it every time i need it?

3 posts - 2 participants