# Integrating with Montage

If you are using a Montage and want to add a camera accompanying this Montage animation clip, the best practice is to create a new `AnimNotifyState` and expose several variables that can be called for each instance.

1. Right click on Content Browser -> select "Blueprint Class" -> Search for "AnimNotifyState" -> click "Select".
2. On the "Variables" section, add variables. For example, here I add a `ClassClass`, a `CameraLocation`, a `CameraRotation`, a `BlendIn` and a `BlendOut` variable. <br>

   <figure><img src="/files/njpDjN0OMUpARH5Awi6u" alt=""><figcaption></figcaption></figure>
3. Implement the `Received_NotifyBegin` function, which is called when this Montage has triggered the notify. The most important thing you should do is to specify the `CallCamera` node and pass in (optional) the follow target and aim target. These parameter values specifically conform to the case in which you call this camera. Below is an exemplary implementation. You can have your own implementation. <br>

   <figure><img src="/files/PAzSCyDQIwfR1rzG3YQM" alt=""><figcaption></figcaption></figure>
4. Like `Received_NotifyBegin`, implement the `Received_NotifyEnd` function, which is called when this Montage has completed the notify. Sometimes you should add a temporary actor variable to record the original view target. When Montage finishes, the view target can be able to restore from the Montage camera.
5. Back to the Montage where you intend to call camera. On the timeline create a new Notify track and add a new notify state of the type you just created. Place it anywhere you want to enable this camera. <br>

   <figure><img src="/files/DOIIgHupUZSip2UPbsoz" alt=""><figcaption></figcaption></figure>
6. Click the notify state and set its variables on the Details panel. <br>

   <figure><img src="/files/0zwYhcCzs5gD8FItBK7g" alt=""><figcaption></figcaption></figure>

You should be very careful about the interruptability of the Montage you are using. If this Montage can be interrupted by other Montages or character actions, you should not call camera through notify because when Montage gets interrupted the `Received_NotifyEnd` function will never have a chance to be called. Then the Montage camera will never end (unless you specify a life time). A feasible workaround to call cameras for interruptable Montages is to use the `PlayMontage` node (or the `PlayMontageAndWaitForEvent` node if you are using GAS) and implement the `OnInterrupted` pin.<br>

<figure><img src="/files/vL0PfcJKK30Dsxdt7L9T" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sulleyyys-organization.gitbook.io/manuals-of-ccs/advanced-uses/integrating-with-montage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
