Casting to Enemy in Service of Behaviour Tree

Hi, I’m having trouble with casting to an Enemy in the Service of its Behaviour Tree. I have other similar Services within the same Behaviour Tree but for some reason, this cast keeps failing although no error shows up. Any suggestions as to why this might be the case? I tried changing the “Event Receive Activation” to “Event Receive Activation AI” but it doesn’t seem to have much of a difference either. I have included some screenshots of the Behaviour Tree and the failed casting. Thanks!!

Can you add a Breakpoint to the cast (“F9”) and when the execution stops, hover over the input. Then you should see what class the parameter has you get there.

1 Like