Jump to content
  • 0
The Bunny Gamer

NPC Passability Help

Question

I was looking for a way to make NPC's passable and I found this:

 

 

However I do not quite understand how to do this. I tried following these instructions as best as I could but all I managed was to make it so the player can move into NPC's a bit then jitter back, as if the client is catching up with the server

Any help would be appreciated, thx!

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

yes that also happen to me at the begining, thats because you are only changing the passable value in NPC but you also need to change the value in the player void that checks if the tile is blocked! 

Share this post


Link to post
Share on other sites
  • 0
Just now, Dagobah said:

this is the void you have to change IsTileBlocked void in Intersect.Client\Entities\Player.cs

i just realize that this is the client so i think would be better to try in this other script

Intersect.Server\Entities\Npc.cs

Share this post


Link to post
Share on other sites
  • 0
9 hours ago, Dagobah said:

i just realize that this is the client so i think would be better to try in this other script

Intersect.Server\Entities\Npc.cs

 

What part in this script do I have to change?

 

if (entity.GetType() == typeof(Resource))
            {
                if (!entity.Passable)
                {
                    return false;
                }
            }

 

Changing "false" to "true" doesn't seem to do anything

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, The Bunny Gamer said:

 

What part in this script do I have to change?

 

if (entity.GetType() == typeof(Resource))
            {
                if (!entity.Passable)
                {
                    return false;
                }
            }

 

Changing "false" to "true" doesn't seem to do anything

 

That part belongs to the "CanAttack" function .. It doesn't track your mobility into said square. I'm digging through the code right now to find the right section for this.

Share this post


Link to post
Share on other sites

×
×
  • Create New...