title: Event dispatcher calling code function
body: <p>I have a question about event dispatchers. I've created dispatcher in my code like this:</p>
  
  <pre><code>DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSoundPausedDelegate, bool, isSoundPaused);
  
  UPROPERTY(BlueprintAssignable)
          FSoundPausedDelegate AudioPause;
  </code></pre>
  
  <p>This works perfectly fine in blueprints. However I don't really know, how can i make it to call function in code?</p>
  
  <p>I guess it's going to be something with:</p>
  
  <pre><code>AudioPause.AddDynamic(this, &amp;UAudioController::OnDelegateBroadcast);
  </code></pre>
  
  <p>What shall I bind it to? This is meant to broadcast value every time i pause/unpause my audio in blueprint and then execute more code logic depending on broadcasted value.</p>
  
  <p>This is how my function looks like:</p>
  
  <pre><code>void UAudioController::OnDelegateBroadcast(bool SoundPaused)
  {
      if (SoundPaused == true)
      {
          SoundPause = true;
          GEngine-&gt;AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("True"));
      }
      else
      {
          SoundPause = false;
          GEngine-&gt;AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("False"));
      }
  }
  </code></pre>