Download

Exposing ability system's target data actor delegate to blueprints

Hello, I posted this question to answers first but that seems to be mostly dead based on what I’ve seen. So let’s try here. To avoid repeating myself from the linked post I give a short synopsis of what I am trying to do:

I have a target data actor class in C++ where I declare and call a delegate. I want that delegate to be exposed in blueprint when spawning the actor via Wait Target Data blueprint node. This does not work - the delegate pin does not appear. Intention for this delegate is to broadcast at regular intervals for the duration of the actor’s lifetime. Please let me know if I am using a wrong pattern for that or missing something in my code. And if you can - post the answer to the answers website since it seems to be more searchable than forums so it’s more likely to help people that way.

Ok, I have never tried that, but wisdom says that you can declare the delegate by usual means, for instance


DECLARE_DYNAMIC_MULTICAST_DELEGATE_SixParams( FComponentBeginOverlapSignature, UPrimitiveComponent*, OverlappedComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, int32, OtherBodyIndex, bool, bFromSweep, const FHitResult &, SweepResult);

and then declare the variable in the target Actor as follows



UPROPERTY(BlueprintAssignable, Category="Collision")
FComponentBeginOverlapSignature OnComponentBeginOverlap;

in order to make it Blueprint accessible.

More description on Delegates (with examples) are here https://docs.unrealengine.com/en-US/Programming/UnrealArchitecture/Delegates/index.html.

Thanks, I know. If you read the linked question it shows there that I have done just what you said. It doesn’t work in this case.

I do not like doing this, but I have to bumb the thread as this is a hard blocker to my progress and there’s so little information on anything related to ability system, that I think it’s also very valuable to the community to have this (and other questions like this) resolved. It’s not hard to reproduce. Maybe someone from epic games can help?

Multicast Delegates cannot be exposed as property pins like that, which is why you get the error with the New Object node.

Ok good to know, I guess?

So is there anything actionable that anyone can say about this?