I don't know what explanation you're referring to. A method for controlling NPC movement was not discussed in that topic.
Here's the best way to keep an NPC from moving that I've found. Use this on the Rotidisc:
Code: Select all
npc.x = npc.x - npc.speedX
npc.y = npc.y - npc.speedX
This code moves the NPC back to where it was at the beginning of the frame, so that its speed doesn't cause it to move. It's a kind of weird way to do it, but its the only way that seems to work reliably.
It works best in onTickEnd, and you'll probably want to wrap the rotodisc with pNPC for better control. Then, move the NPC as desired by changing its position, not its speed. This will cause weird behavior for any player or NPC standing on it, but since you can't stand on a rotodisc, this isn't really going to be an issue in this case.