> For the complete documentation index, see [llms.txt](https://dapper-raptor.gitbook.io/quest-map-pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dapper-raptor.gitbook.io/quest-map-pro/getting-started/setting-up-npcs/getnpcstate-function.md).

# GetNPCState Function

Step 2 of 4 in setting up NPCs to work with Quest Map Pro

Look for the newly added interface function called **GetNPCState** and open it. You can either set the output variable “**State**” directly in the return node, or use a variable for more dynamic NPCs, as shown in the picture below.

<figure><img src="https://lh5.googleusercontent.com/PXOjuxR7iZZ9nxJPt26HUZBEH5IZhjmd1ISG_MsQE7iuWx4PIrLUrLdOo6d0lgk8p9RU-Srz8K0aq1h6ORjEGqqR2eCfMW1y_Ob0ye20lIZv8htqwEp2lWl28bCeAzS0WDJXs9CLeZ_dnCvt9LtuvGc" alt=""><figcaption></figcaption></figure>

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Go Back:</td><td><strong>Adding the Interface to your NPC</strong></td><td></td><td><a href="/quest-map-pro/getting-started/setting-up-npcs/adding-the-interface-to-your-npc.md">Adding the Interface to your NPC</a></td></tr><tr><td>Next Step:</td><td><strong>GetNPCIcon Function</strong></td><td></td><td><a href="/quest-map-pro/getting-started/setting-up-npcs/getnpcicon-function.md">GetNPCIcon Function</a></td></tr></tbody></table>
