Multi-cast delegates are a great way to broadcast an event to multiple objects that listen or subscribe to the event in question. They are particularly invaluable if you have a C++ module that generates events that potentially arbitrary Actors might want to be notified about. This recipe shows you how to create a multi-cast delegate in C++ that can notify a group of other Actors during runtime.
Exposing multi-cast delegates to Blueprint
How to do it...
- Create a new StaticMeshActor class called King. Add the following to the class header:
#pragma once
#include "CoreMinimal.h"
#include "Engine/StaticMeshActor.h"
#include "King.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnKingDeathSignature...