Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

Pathfinder Momentarily Overrides Controllable

Open Maitlans opened this issue 5 years ago • 2 comments

The output of command /version on my server is: git-paper-101 MC: 1.16.1 The output of command /version citizens on my server is: 2.0.27-SNAPSHOT (build 2067)

Hi, there's an issue with Sentinel & Citizen's controllable feature, when your controllable entity starts to target an enemy because it either was shot or something, it'll attempt to go to it so it'll conflict with your controls as it'll make you move very slowly & if you stop moving it'll drag you towards the target. Thank you.

Maitlans avatar Sep 11 '20 07:09 Maitlans

I've confirmed this locally.

/npc create bob, /npc controllable, mount the NPC, /ex walk <npc> <npc.location.backward[15]> (or any other pathfind command). The pathfinder overrides the player's own control of the NPC movement.

This might be a bit of an awkward thing to fix as there is a valid question of who is in control of movement. In my mind, it should always be the top entity (ie in this situation, the player mounted atop the npc, and not the npc) (and in situations like a player npc mounted on a horse npc, that top player npc should have control, not the horse). I think at least fullwall has thought differently about how that should go. I think, given that /npc controllable explicitly grants the player control over the NPC's movement (and non-controlling mounting can be done without that for npcs other than horses), the NPC's pathfinding should be effectively disabled for so long as a player is atop with /npc controllable and thus in theoretical control of movement.

mcmonkey4eva avatar Sep 16 '20 10:09 mcmonkey4eva

Other problem is that /npc controllable is tied up with mounting, and it's very possible that you might have NPC mounts that don't let you control them per se but just travel on their own routine. Perhaps need to add a separate trait.

fullwall avatar Oct 14 '20 07:10 fullwall