# Objectives

### Adding New Objectives

1. Select or create a new **Objectives** asset. In the desired folder, right-click and select **Create -> UHFPS -> Game -> Objectives Asset.**
2. Add a new objective to the **Objectives** list. Each objective consists of sub-objectives, so make sure to add a new sub-objectives into the **Sub Objectives** list.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FVlL94sTfC8L1F1WNssGz%2FScreenshot_1.png?alt=media&#x26;token=ea2b70c0-cddc-431d-a5f0-11eadf38cc46" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can specify how many times the objective must be completed by setting the **Complete Count**.
{% endhint %}

{% hint style="info" %}
To display the objective complete count progress, add the <mark style="color:orange;">**\[count]**</mark> selector to the sub-objective text.
{% endhint %}

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FgRuscfDBjCBjASwOT26T%2FScreenshot_2.png?alt=media&#x26;token=a409545a-e880-44d9-a92a-ee2629251e92" alt=""><figcaption></figcaption></figure>

3. Assign the objectives asset to the **Objective Manager** component, which can be found in the **GAMEMANAGER**.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FqpPQosAOQKWhgXZqmwIf%2FScreenshot_2.png?alt=media&#x26;token=906ed52b-45e5-47d2-a3aa-bc32659005f9" alt=""><figcaption></figcaption></figure>

4. To trigger an objective, add an **Objective Trigger** component to the corresponding object. You can activate the objective via the **Trigger**, **Interact**, or **Event**.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FYs7YRT2ERIOKMtPghcgl%2FScreenshot_4.png?alt=media&#x26;token=4074b2c0-602d-4fc2-8e02-bd9c5b3a629a" alt=""><figcaption></figcaption></figure>

5. To assign an objective, click on the link icon located on the right side of the objective block.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FyIKIEzCzdODj7FdjdNXJ%2FScreenshot_5.png?alt=media&#x26;token=143904a3-57aa-46ed-ae46-e2e2c5827ae1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can assign multiple sub-objectives from the same base objective, that will be activated.
{% endhint %}

6. To activate an objective via an event, set the **Trigger Type** to **Event**. Then, simply call the <mark style="color:blue;">**TriggerObjective()**</mark> method to activate the objective. You can call this method, for example, by adding the **On Take Event** when picking up an object.

<figure><img src="https://2665493337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8bp6Jx5qkS4c0NEaWR1%2Fuploads%2FEHr7WAo36B2k08XtFMoU%2FScreenshot_6.png?alt=media&#x26;token=c13ef991-9da1-4f62-bf2c-db9a359f796f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Another option is to set the **Trigger Type** to **Interact** along with an **Interactable Item** added to the object. In this case, both components will be interacted with.
{% endhint %}
