I'm more or less looking for some help, mainly how events and players are moved as I already know the math behind the movement just how to control it in Mv.
Math.
Just swap Player with NPC and vice versa for the other way around, this would just move the event away from the player in any direction based on the radians of the player.
If anyone can help or point me in the right direction that would be great 🙂
Math.
Just swap Player with NPC and vice versa for the other way around, this would just move the event away from the player in any direction based on the radians of the player.
Code:
dir = pi * arctan2(Player.y - Npc.y, Npc.x - Player.x) * (180 / pi) / 180;
x+=cos(dir)*2;
y+=-sin(dir)*2;
If anyone can help or point me in the right direction that would be great 🙂