Jump to content

Can't interact with NPC anymore when reentering area


Recommended Posts

Posted

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

Posted
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!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...