I already create event, but i dont know how to bind to the event
what i’ve done up until know :
Declare the event
public:
UCharacterState();
DECLARE_EVENT_OneParam(UCharacterState, FCharacterStateChangeEvent, ECharacterState);
FCharacterStateChangeEvent& OnChanged() { return CharacterStateChangeEvent; }
public:
FCharacterStateChangeEvent CharacterStateChangeEvent;
Broadcast the event:
void UCharacterState::ServerUpdateCharacterState_Implementation(ECharacterState _CharacterState)
{
if (GetOwnerRole() == ROLE_Authority)
{
CharacterState = _CharacterState;
CharacterStateChangeEvent.Broadcast(_CharacterState);
}
}
what i still missing is how to subscribe/bind to the event