Page 1 of 1

Make the player walk somewhere in a nice looking way.

Posted: Thu Feb 22, 2018 10:47 pm
by eradicator
In my mod i want to make the player walk a short distance towards an object. Currently i'm using on_tick to set the walking_state of the player character each tick. In Singleplayer this works "okaish". The only thing that looks shitty is if the direction is changed too often (oscillating between two of the 8 directions due to angle to target) but i guess i could code around that but... In Multiplayer it looks horribly laggy. My guess is that the lag hiding mechanism reacts too aggressive. It looks like the player is teleported around every half second or so instead of properly walking.
CODE
So my questions are:
  • Is there a better way to make the player walk then using walking_state? (biter ai maybe?)
  • If not is there some hack around the lack hiding? (like temporarily detaching the player character from the player?)
  • Has anyone done something similar before somewhere?