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

# GetNPCState Function

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="adding-the-interface-to-your-npc">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="getnpcicon-function">getnpcicon-function</a></td></tr></tbody></table>
