> For the complete documentation index, see [llms.txt](https://easy-event-manager.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easy-event-manager.gitbook.io/documentation/implementation/getting-started.md).

# Getting started

Explanation of how to implement the system to an object

1. Open your object that you want to bind an event to and add the **EasyEventManagerInterface**.\ <br>

   <figure><img src="https://3743917652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F461QZtnJljYazCvCp6z0%2Fuploads%2F0pVjOIKIke8byjGb4ZJX%2Fimage.png?alt=media&amp;token=4134de6e-c222-484d-b6c8-9b95ee3b8a6c" alt=""><figcaption></figcaption></figure>

2. Recompile your Blueprint to be able to find the functions in the Right-Click Menu;<br>

   <figure><img src="https://3743917652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F461QZtnJljYazCvCp6z0%2Fuploads%2FAWG0mRxvvlntGiUhmG6I%2Fimage.png?alt=media&amp;token=ef5d7732-0d67-4f37-9bdf-417d3ae634ef" alt=""><figcaption><p>  </p></figcaption></figure>

   or implement it through the Interface panel on the left side:<br>

   <figure><img src="https://3743917652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F461QZtnJljYazCvCp6z0%2Fuploads%2F0rMxv84Aw3ZH8jjTQrau%2Fimage.png?alt=media&amp;token=2a5d2fa4-2e9e-4367-8f08-9ca33a136e68" alt=""><figcaption></figcaption></figure>

3. Now you are **ready** to bind an event by using either [**`BindEvent()`**](/documentation/functions/bind-event.md) or [**`BindEventTag()`**](/documentation/functions/bind-event.md)<br>

   <figure><img src="https://3743917652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F461QZtnJljYazCvCp6z0%2Fuploads%2FlITh2baTWz7wHUTHmXhd%2Fimage.png?alt=media&amp;token=fc504ad2-2528-4d08-86f8-2dc1ef817a3f" alt=""><figcaption><p>You can call <a href="/documentation/functions/bind-event.md"><strong>BindEvent()</strong></a> or <a href="/documentation/functions/unbind-event.md"><strong>UnbindEvent()</strong></a> from anywhere!</p></figcaption></figure>

4. Implement the [**`OnEventCalled()`**](/documentation/functions/on-event-called.md) or [**`OnEventTagCalled()`**](/documentation/functions/on-event-called.md) function from the Interface<br>

   <figure><img src="https://3743917652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F461QZtnJljYazCvCp6z0%2Fuploads%2FJxghoCndNBRwgDP3cnC8%2Fimage.png?alt=media&amp;token=14a68fba-7ac7-4046-ac3a-d270203075ce" alt=""><figcaption></figcaption></figure>

And **that's it**! Now you can use [**`CallEvent()`**](/documentation/functions/call-event.md) or [**`CallEventTag()`**](/documentation/functions/call-event.md) anywhere you want, easy right?<br>

<figure><img src="https://3743917652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F461QZtnJljYazCvCp6z0%2Fuploads%2FCji2MqSi1z2BtMaUD7jn%2Fimage.png?alt=media&amp;token=97234a59-edb2-45f7-aa94-4966f49749cc" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This part is only for those who want to use it in C++!
{% endhint %}

## C++ Implementation

1. Implement the **`EasyEventManagerInterface`** to your c++ class

**Header file:**

```cpp
public IEasyEventManagerInterface
```

**Example:**

```cpp
class AMyActor : public AActor, public IEasyEventManagerInterface
{
}
```

2. Now you are **ready** to bind an event by using either [**`BindEvent()`**](/documentation/functions/bind-event.md) or [**`BindEventTag()`**](/documentation/functions/bind-event.md)

#### Cpp file:

```cpp
// For Tag usage
#include "GameplayTagsManager.h"

void AMyActor::BeginPlay()
{
  UEasyEventManagerLibrary::BindEvent(this, FName("MyEvent"), Object);
  // or for tags
  UEasyEventManagerLibrary::BindEventTag(this, UGameplayTagsManager::Get().RequestGameplayTag(FName("MyEventTag"), true), Object);
  
  // call parent function
  Super::BeginPlay();
}
```

{% hint style="info" %}
You can call [**BindEvent()**](/documentation/functions/bind-event.md) or [**UnbindEvent()**](/documentation/functions/unbind-event.md) from anywhere!
{% endhint %}

3. Implement the [**`OnEventCalled()`**](/documentation/functions/on-event-called.md) or [**`OnEventTagCalled()`**](/documentation/functions/on-event-called.md) function from the Interface

**Header file:**

```cpp
virtual void OnEventCalled_Implementation(FName Event, const FString& Message, UObject* Payload);
virtual void OnEventTagCalled_Implementation(FGameplayTag EventTag, const FString& Message, UObject* Payload);
```

**Cpp file:**

```cpp
void AMyActor::OnEventCalled_Implementation(FName Event, const FString& Message, UObject* Payload)
{
   //some code
}

void AMyActor::OnEventTagCalled_Implementation(FGameplayTag EventTag, const FString& Message, UObject* Payload)
{
   //some code
}
```

4. And **that's it**! Now you can use [**`CallEvent()`**](/documentation/functions/call-event.md) or [**`CallEventTag()`**](/documentation/functions/call-event.md) anywhere you want, easy right?
