Jump to content
Hybris

Can't interact with NPC anymore when reentering area

Recommended Posts

Hello,

I'm working on a thieving script and it works fine, but when I go to the bank and come back to the area, it seems to missplace the NPC entity and I can't interact with it anymore. I've checked and the npc is not null, it even has the correct actions. I added a line to draw the outline of the NPC and when this happens, it's just on a random square instead of on the actual NPC.

Also interesting to note that when I restart the script, it still seems to select this random square instead of the NPC, unless I refresh my scripts.

Any ideas? Using mirror mode btw.

Thanks,

Hybris

Link to post
Share on other sites
1 hour ago, Camaro said:

The entity probably no longer exists. When you walk far enough away and the region reloads, if the entity ends up outside of the new region, the entity will "despawn" from your local client

just check the .exists() method

That worked, thanks a lot!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...