Casting actor BP reference to Bind Event OnDestroyed

Hi. Everyone. I’m working on a project given in the book Unreal Engine 4.X Bybuilding a simple game in which you must jump over barrels rolling down ramps and reach the end of the level.

If you hit the barrels, you’re supposed to respawn at the beginning of the level and try again. This doesn’t work and everything matchs upto the book’s instructions except from the fact that I cannot cast my actor BP reference to the target for Event OnDestroyed node.
The book is fairly outdated and uses 4.11 whereas I’m using 4.13, so I’m wondering if there’s a different way to do this in 4.13 and newer?
Thanks.

I think you are missing the pin connection between your BH_Character and the Bind node Target.

Try this:

Oh no, what I mean is I’ve been trying to do exactly that but I cannot, as I’m told “BH Character Reference is not compatiable with self-reference.”

Just did this in the ThirdPerson Template Project.

Try dragging the pin from your Cast node and manually search the node like this:

If you try to connect the pin to a Bind Event node you already have in your Graph, it will give you the incompatibility message.

139057-screenshot_4.png

I’m not sure, but I think that if you create a Bind Node with nothing attached, it will automatically set its Target class to the class you are in. So if you do it in a Level (like I did), is normal to have an incompatibility error between Actor and Level.

I’m not able to recreate the example you’ve given as I’m not technically using the thirdpersoncharacter, as I’ve rebuilt some of its functionality as a separate character blueprint called BH_Character.

I’ve also tried to recreate the event in character instead of level, but I cannot do this as this blueprint requires Event BeginPlay to work and in the character BP, I’m using that for another series of blueprints.

I’m going to share a dropbox link to the project, maybe if you’re able to look inside you’ll be able to figure out whats up:

You can do a sequence node in beginplay to do more stuff mate.

Do you have the actual event dispatcher in the blueprint? That might be the problem. Take a look at this documentation, might help you

It is absolutely correct to listen for a character destroy event in the Level Blueprint, so I wouldn’t reccomend doing it inside your character BP.

Can’t promise to have the time to investigate the code you shared, but in the meantime:

Have you tried calling the Bind node as in my second screenshot?
Can you do the connection like that? If not,
what error pops up?(https://answers.unrealengine.com/storage/attachments/139055-screenshot_3.png)