The term BlueprintImplementableEvent is a bit misleading I think. It basically acts as a specifier to allow for blueprint overrides of functions. So in your case you can have a blueprint that gives the function “Event” a body that is executed whenever the function is called.
The equivalent of actual Events in C++ is called Delegates. You can find the documentation for them here:
If you create multicast delegates and mark them BlueprintAssignable you can also use them from blueprints.
Multi-Cast delegates do work just the way events do. But from your link, I could find another link to events, and now it works flawlessly.
Thank you again!
edit –
In case anyone else got stuck like me with c++ events, and found this post, here’s how I’ve done it:
Class with event:
**.h:**
DECLARE_EVENT_OneParam(ATemplateCharacter, QPressed, FString)
UCLASS()
class ATemplateCharacter : public ACharacter
{
...
/*Skill held by the character*/
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Skill)
class UTemplateBaseSkill* QSkill;
/*Event when Q key is pressed*/
QPressed FirstEvent;
/*Function that will fire event*/
UFUNCTION(BlueprintCallable, Category = Skill)
void Fire();
};
**.cpp:**
#include "BaseSkill.h"
ATemplateCharacter::ATemplateCharacter(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
// Create Skill and call it's subscription function, so that it can subscribe to all the necessary events (the skill gets pointer to owner)
QSkill = NewNamedObject<UTemplateBaseSkill>(this, TEXT("QSkill"));
QSkill->Subscribe(this);
}
void ATemplateCharacter::Fire()
{
FirstEvent.Broadcast("jack");
}