Jump to content
  • 0

NPC Passability Help


Guest

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!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1
8 hours ago, Dagobah said:

i just code 

 

Passable = true; 

 

in the variables statement section, hope that work out!

 

Worked, tysm!

Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

×
×
  • Create New...