> For the complete documentation index, see [llms.txt](https://fantacode.gitbook.io/cutscene-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fantacode.gitbook.io/cutscene-system/documentation/nodes.md).

# Nodes

There are 5 types of nodes for creating dialogues & cutscenes in our system

## Dialogue Node

Used to show/play a dialogue

<div><figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2FyQUMiNIDq5kB6yKSQoMd%2FD.gif?alt=media&amp;token=f1d9d68e-2da1-4fb7-a310-146c2c6cc61c" alt=""><figcaption></figcaption></figure> <figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2F8A6Z1YTWr8UW3bUZkGbs%2FScreenshot%202023-03-20%20195054.png?alt=media&amp;token=b5d11eef-8fc2-4997-9906-85e1344218d4" alt=""><figcaption></figcaption></figure></div>

#### **Character creation**

There is a character addition option in database window, you can use to create a character once and set them as the speaker of multiple dialogues easily by selecting from the picker.

To open the cutscene database window, go to <mark style="color:blue;">Cutscene System ► Cutscene Database</mark> from the menu

<div align="left"><figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2FCgxhou2Bl5CHX1YRNng3%2FScreenshot%202023-03-22%20112043.png?alt=media&amp;token=25e47ff5-2c49-407e-ba03-4e0b98c78556" alt=""><figcaption></figcaption></figure></div>

## Choice Node

Used to show choices

<figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2FAFmppyFtLmDWWHyvesfi%2FTest%20Cutscene.gif?alt=media&amp;token=532cb246-5c02-422a-b6c0-f69d7ad6e50a" alt=""><figcaption></figcaption></figure>

## SetFact Node

This node is used to add/update Facts. Facts can be used to create non-linear gameplay by remembering the choices made by the user and later using it to select different story branches.

<div align="left"><figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2FIiBhHLlRjAr9xJ44nZ8i%2FScreenshot_20230214_191101.png?alt=media&amp;token=8a44745a-482b-4f2f-be25-9b887e6685d4" alt=""><figcaption></figcaption></figure></div>

Saved Facts can be found in the FactDB scriptable object (<mark style="color:blue;">Assets ► Non-Linear Dialogue & Cutscene System ► Resources ► Database</mark> <mark style="color:blue;">► FactDB</mark>)

<div align="left"><figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2FkK82ty3an9EKHXafO2b7%2FScreenshot%202023-03-20%20181339.png?alt=media&amp;token=47d140ce-f4ba-4cff-a30e-d23ab0444639" alt=""><figcaption></figcaption></figure></div>

#### Using facts to select different cutscene branches

We can use facts to select different branches from the cutscene graph based on the user’s choice. To achieve this, we can add a fact condition on a connection between two nodes and the flow will only reach from one node to another if that condition is satisfied.

#### How to add conditions on connection

<div align="left"><figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2FBFudTDEEiQIqH7XKOmX2%2FScreenshot_20230214_191416.png?alt=media&amp;token=26f2d28d-e53f-417f-aa2f-7710702c30d3" alt=""><figcaption></figcaption></figure></div>

Click the connection line, then you can see the **Add Fact Condition** button on the inspector, click the button to add new conditions

<div align="left"><figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2FDdci7BkryrLDUNHjzprd%2FScreenshot_20230214_191720.png?alt=media&amp;token=b8e2fc08-fe58-4521-814a-197cef0ecf01" alt=""><figcaption></figcaption></figure></div>

## Cutscene Node

Cutscene node contains different cutscene actions like PlayAnimation, Move,  ChangeCamera, etc. Now, these are the cutscene actions available in our system. Check out [<mark style="color:blue;">this page</mark>](/cutscene-system/documentation/cutscene-actions.md) to learn more.&#x20;

#### Available cutscene actions

1. [Play Animation](/cutscene-system/documentation/cutscene-actions.md#play-animation)
2. [Move](/cutscene-system/documentation/cutscene-actions.md#move)
3. [Rotate](/cutscene-system/documentation/cutscene-actions.md#rotate)
4. [<mark style="color:blue;">Set Camera Angle</mark>](/cutscene-system/documentation/cutscene-actions.md#set-camera-angle)
5. [Change Camera](/cutscene-system/documentation/cutscene-actions.md#change-camera)
6. [Switch Cinemachine](/cutscene-system/documentation/cutscene-actions.md#switch-cinemachine)
7. [Audio](/cutscene-system/documentation/cutscene-actions.md#audio)
8. [Enable\Disable Object](/cutscene-system/documentation/cutscene-actions.md#enable-disable-object)
9. [Spawn](/cutscene-system/documentation/cutscene-actions.md#spawn)
10. [Fade](/cutscene-system/documentation/cutscene-actions.md#fade)
11. [Wait](/cutscene-system/documentation/cutscene-actions.md#wait)
12. [Change Transform](/cutscene-system/documentation/cutscene-actions.md#change-transform)
13. [Set Animator Parameter](/cutscene-system/documentation/cutscene-actions.md#set-animator-parameter)
14. [Change Sprite](/cutscene-system/documentation/cutscene-actions.md#change-sprite)
15. [Destroy](/cutscene-system/documentation/cutscene-actions.md#destroy)

## Trigger Event Node

This Node is used to execute a **Unity Event**. You can use it to call a function from any script and run custom behaviors from the cutscene. Multiple functions can be attached to a single node and whenever the node is executed it will call those functions in the order they were provided

<div align="left"><figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2F6fCir7InIwvx0JlOzrDI%2FScreenshot%202023-03-20%20182713.png?alt=media&amp;token=cbd73471-4503-4a63-8363-bc045989c8e5" alt=""><figcaption></figcaption></figure></div>

## Random Node

This can be used to run a random node from its output connection. &#x20;

<div align="left"><figure><img src="https://3007250873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP9FEBK4VU4ZymTQrhNzz%2Fuploads%2FK4mJXcFdsuP5OMSyIG40%2FScreenshot%202023-04-24%20160904.png?alt=media&amp;token=66792565-ce84-4b85-aaee-40b9cca4f9d6" alt=""><figcaption></figcaption></figure></div>

In the above connection, only one of the PlayAnimation actions will be executed and it will be selected from the random node&#x20;
