File size: 5,114 Bytes
18a519f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | # Create a new state
You can create three types of State nodes in a State Graph: [Script States](#create-a-script-state), [Any States](#create-an-any-state), and [Super States](#create-a-super-state). For more information on the types of State nodes, see State Graphs in [Graphs](vs-graph-types.md#state-graphs).
You can also add a [Sticky Note](vs-sticky-notes.md) to add comments to a graph.
## Create a Script State
To create a new blank Script State:
<ol>
<li><p>[!include[open-state-menu](./snippets/vs-open-state-menu.md)]</p></li>
<li><p>Select <strong>Create Script State</strong>. <br/>Visual Scripting creates a new Script State node.</p></li>
<li><p>Open the <a href="vs-interface-overview.md#the-graph-inspector">Graph Inspector</a>.</p></li>
<li><p>In the Graph Inspector, choose a source for the Script State node:</p>
<ul>
<li><p><strong>Embed</strong>: The graph only exists on the Script State node. You can only modify the graph from the node in its parent State Graph.</p></li>
<li><p><strong>Graph</strong>: The graph exists in a separate file. You can modify the graph outside of its parent State Graph and reuse the graph in other areas of your application.</p></li>
</ul>
</li>
<li><p>If you chose <strong>Graph</strong>:</p>
<ol type="a">
<li><p>Select <strong>New</strong>.</p></li>
<li><p>Enter a name for the graph file.</p></li>
<li><p>Choose where you want to save the new graph.</p></li>
<li><p>Select <strong>Save</strong>.</p></li>
</ol></li>
</ol>

To create a Script State from an existing Script Graph:
<ol>
<li><p>[!include[open-state-menu](./snippets/vs-open-state-menu.md)]</p></li>
<li><p>Select <strong>Create Script State</strong>. <br/>Visual Scripting creates a new Script State node.</p></li>
<li><p>Open the <a href="vs-interface-overview.md#the-graph-inspector">Graph Inspector</a>.</p></li>
<li><p>In the Graph Inspector, set the source for the Script State node to <strong>Graph</strong>.</p></li>
<li><p>Do one of the following:</p>
<ul>
<li><p>Select the object picker (circle icon) and choose a compatible Script Graph from your project.</p></li>
<li><p>Click and drag a Script Graph file from your Project window and release on the <strong>Graph</strong> field.</p></li>
</ul></li>
</ol>

> [!TIP]
> Click and drag the Script Graph from your Project window into the Graph Editor to automatically create a Script State node.
## Create an Any State
To create a new Any State node:
1. [!include[open-state-menu](./snippets/vs-open-state-menu.md)]
2. Select **Create Any State**.

## Create a Super State
To create a new blank Super State:
<ol>
<li><p>[!include[open-state-menu](./snippets/vs-open-state-menu.md)]</p></li>
<li><p>Select <strong>Create Super State</strong>. <br/>Visual Scripting creates a new Super State node.</p></li>
<li><p>Open the <a href="vs-interface-overview.md#the-graph-inspector">Graph Inspector</a>.</p></li>
<li><p>In the Graph Inspector, choose a source for the Super State node:</p>
<ul>
<li><p><strong>Embed</strong>: The graph only exists on the Super State node. You can only modify the graph from the node in its parent State Graph.</p></li>
<li><p><strong>Graph</strong>: The graph exists in a separate file. You can modify the graph outside of its parent State Graph and reuse the graph in other areas of your application.</p></li>
</ul>
</li>
<li><p>If you chose <strong>Graph</strong>:</p>
<ol type="a">
<li><p>Select <strong>New</strong>.</p></li>
<li><p>Enter a name for the graph file.</p></li>
<li><p>Choose where you want to save the new graph.</p></li>
<li><p>Select <strong>Save</strong>.</p></li>
</ol></li>
</ol>

To create a Super State from an existing State Graph:
<ol>
<li><p>[!include[open-state-menu](./snippets/vs-open-state-menu.md)]</p></li>
<li><p>Select <strong>Create Super State</strong>. <br/>Visual Scripting creates a new Super State node.</p></li>
<li><p>Open the <a href="vs-interface-overview.md#the-graph-inspector">Graph Inspector</a>.</p></li>
<li><p>In the Graph Inspector, set the source for the Super State node to <strong>Graph</strong>.</p></li>
<li><p>Do one of the following:</p>
<ul>
<li><p>Select the object picker (circle icon) and choose a compatible State Graph from your project.</p></li>
<li><p>Click and drag a State Graph file from your Project window and release on the <strong>Graph</strong> field.</p></li>
</ul></li>
</ol>

> [!TIP]
> Click and drag the State Graph from your Project window into the Graph Editor to automatically create a Super State node.
|