# Bind multicast delegate with Add()

**URL:** <https://forums.unrealengine.com/t/bind-multicast-delegate-with-add/299663>\
**Category:** Community & Industry Discussion\
**Tags:** binding, add, unreal-engine, delegate, question\
**Created:** [November 23, 2014, 9:01am UTC](https://forums.unrealengine.com/t/bind-multicast-delegate-with-add/299663 "2014-11-23T09:01:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![itsAcren](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/itsacren/32/1194653_2.png) [@itsAcren](https://forums.unrealengine.com/u/itsAcren)\
**Post date:** [November 23, 2014, 9:01am UTC](https://forums.unrealengine.com/t/bind-multicast-delegate-with-add/299663/1 "2014-11-23T09:01:25Z")

</div>

Hello.

I want to bind a method in a component to the OnTakeAnyDamage event of the owning Actor.

OnTakeAnyDamage as defined in Actor.h:

```
UPROPERTY(BlueprintAssignable, Category="Game|Damage")
FTakeAnyDamageSignature OnTakeAnyDamage;

```

FTakeAnyDamageSignature:

```
DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams( FTakeAnyDamageSignature, float, Damage, const class UDamageType*, DamageType, class AController*, InstigatedBy, AActor*, DamageCauser );

```

The method I want to bind in the component:

```
UFUNCTION()
void TakeDamage(float Damage, UDamageType* const DamageType, class AController* InstigatedBy, class AActor* DamageCauser);

```

Now, in the constructor of the component I want to bind the TakeDamage method to the owning actor’s OnTakeAnyDamage delegate.

I can access GetOwner()-\>OnTakeAnyDamage, which has an Add() method, but nothing I try works.

What’s the syntax for this?

Thanks.

---

<div class="post-metadata">

**Author:** ![enlight\_2014](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@enlight\_2014](https://forums.unrealengine.com/u/enlight_2014)\
**Post date:** [November 23, 2014, 4:02pm UTC](https://forums.unrealengine.com/t/bind-multicast-delegate-with-add/299663/2 "2014-11-23T16:02:55Z")

</div>

You need to use the **AddDynamic** macro for dynamic delegates, the macro simply resolves to a call to the **\_\_Internal\_AddDynamic()** method of a dynamic delegate, but unfortunately Intellisense usually won’t suggest it to you.

Here’s sample usage from CharacterMovementComponent.cpp in the engine source:

```
UpdatedComponent->OnComponentBeginOverlap.AddDynamic(this, &UCharacterMovementComponent::CapsuleTouched);
```

---

<div class="post-metadata">

**Author:** ![BaderThanBad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BaderThanBad](https://forums.unrealengine.com/u/BaderThanBad)\
**Post date:** [November 23, 2014, 4:23pm UTC](https://forums.unrealengine.com/t/bind-multicast-delegate-with-add/299663/3 "2014-11-23T16:23:49Z")

</div>

I had some trouble when I first started using delegates because I had a misunderstanding about how they were called. Hope this helps: [link text](https://answers.unrealengine.com/questions/109955/bind-delegate-with-one-parameter.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_03ff54a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_03ff54a3](https://forums.unrealengine.com/u/anonymous_user_03ff54a3)\
**Post date:** [October 20, 2022, 9:22am UTC](https://forums.unrealengine.com/t/bind-multicast-delegate-with-add/299663/4 "2022-10-20T09:22:15Z")

</div>

Thank you, enlight\_2014. It’s true that it doesn’t show up in intellisense which is why it becomes confusing.
