A game about forced loneliness, made by TACStudios
1# Create a new state
2
3You 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).
4
5You can also add a [Sticky Note](vs-sticky-notes.md) to add comments to a graph.
6
7## Create a Script State
8
9To create a new blank Script State:
10
11<ol>
12<li><p>[!include[open-state-menu](./snippets/vs-open-state-menu.md)]</p></li>
13<li><p>Select <strong>Create Script State</strong>. <br/>Visual Scripting creates a new Script State node.</p></li>
14<li><p>Open the <a href="vs-interface-overview.md#the-graph-inspector">Graph Inspector</a>.</p></li>
15<li><p>In the Graph Inspector, choose a source for the Script State node:</p>
16<ul>
17<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>
18<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>
19</ul>
20</li>
21<li><p>If you chose <strong>Graph</strong>:</p>
22<ol type="a">
23<li><p>Select <strong>New</strong>.</p></li>
24<li><p>Enter a name for the graph file.</p></li>
25<li><p>Choose where you want to save the new graph.</p></li>
26<li><p>Select <strong>Save</strong>.</p></li>
27</ol></li>
28</ol>
29
30
31
32
33To create a Script State from an existing Script Graph:
34
35<ol>
36<li><p>[!include[open-state-menu](./snippets/vs-open-state-menu.md)]</p></li>
37<li><p>Select <strong>Create Script State</strong>. <br/>Visual Scripting creates a new Script State node.</p></li>
38<li><p>Open the <a href="vs-interface-overview.md#the-graph-inspector">Graph Inspector</a>.</p></li>
39<li><p>In the Graph Inspector, set the source for the Script State node to <strong>Graph</strong>.</p></li>
40<li><p>Do one of the following:</p>
41<ul>
42<li><p>Select the object picker (circle icon) and choose a compatible Script Graph from your project.</p></li>
43<li><p>Click and drag a Script Graph file from your Project window and release on the <strong>Graph</strong> field.</p></li>
44</ul></li>
45</ol>
46
47
48
49> [!TIP]
50> Click and drag the Script Graph from your Project window into the Graph Editor to automatically create a Script State node.
51
52
53## Create an Any State
54
55To create a new Any State node:
56
571. [!include[open-state-menu](./snippets/vs-open-state-menu.md)]
58
592. Select **Create Any State**.
60
61
62
63
64## Create a Super State
65
66To create a new blank Super State:
67
68<ol>
69<li><p>[!include[open-state-menu](./snippets/vs-open-state-menu.md)]</p></li>
70<li><p>Select <strong>Create Super State</strong>. <br/>Visual Scripting creates a new Super State node.</p></li>
71<li><p>Open the <a href="vs-interface-overview.md#the-graph-inspector">Graph Inspector</a>.</p></li>
72<li><p>In the Graph Inspector, choose a source for the Super State node:</p>
73<ul>
74<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>
75<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>
76</ul>
77</li>
78<li><p>If you chose <strong>Graph</strong>:</p>
79<ol type="a">
80<li><p>Select <strong>New</strong>.</p></li>
81<li><p>Enter a name for the graph file.</p></li>
82<li><p>Choose where you want to save the new graph.</p></li>
83<li><p>Select <strong>Save</strong>.</p></li>
84</ol></li>
85</ol>
86
87
88
89To create a Super State from an existing State Graph:
90
91<ol>
92<li><p>[!include[open-state-menu](./snippets/vs-open-state-menu.md)]</p></li>
93<li><p>Select <strong>Create Super State</strong>. <br/>Visual Scripting creates a new Super State node.</p></li>
94<li><p>Open the <a href="vs-interface-overview.md#the-graph-inspector">Graph Inspector</a>.</p></li>
95<li><p>In the Graph Inspector, set the source for the Super State node to <strong>Graph</strong>.</p></li>
96<li><p>Do one of the following:</p>
97<ul>
98<li><p>Select the object picker (circle icon) and choose a compatible State Graph from your project.</p></li>
99<li><p>Click and drag a State Graph file from your Project window and release on the <strong>Graph</strong> field.</p></li>
100</ul></li>
101</ol>
102
103
104
105> [!TIP]
106> Click and drag the State Graph from your Project window into the Graph Editor to automatically create a Super State node.