Custom compontents and blueprint implementable events

I want to create an event in a components which I can implement in a blueprint, but I can’t seem te get this working. Searching on this forum I found pretty old topics stating this was not implemented, but being worked on, so I assume it is possible by now. I feel like I’m missing something very obvious.

Here is my code:

UCLASS(meta = (BlueprintSpawnableComponent))
class LEVELDOWN_API UAbility : public UActorComponent
{
	GENERATED_BODY()

public:
	UFUNCTION(BlueprintImplementableEvent, Category = "Ability")
		void OnAbilityUsed();
};

When I attach this component to my character, the event doesn’t show up in the right click drop down in the blueprint. Can somebody point me out to what I am doing wrong?

You need to declare it as a dynamic multicast delegate, not as a BlueprintImplementableEvent:

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FAbilityUsedDelegate);
UPROPERTY(BlueprintAssignable, Category = "Ability")
FAbilityUsedDelegate OnAbilityUsed;

I can’t get it to work that way. When I c&p your solution I get the following compiler error: “Unknown function specifier ‘BlueprintAssignable’”. I am using 4.8.2. Any ideas?

In case anyone stumbles across this, I had this error and it means you’re using the UFUNCTION macro when you should be using the UPROPERTY macro!