Essentially what I'm trying to do is convert code that would either push the hero or enemy back either straight, or diagonally.
degree = radtodeg(arctan2(vec1.y - vec2.y, vec2.x - vec1.x));Now Vec1 and Vec2 are variables, 1 is for the hero, and 2 is for the enemy.
kd
I'm currently working on a seiken densetsu type of battle system, and so far everything seems to be going smoothly. But one thing I remembered is that some enemies would be pushed diagonally of course this is dependent of where the hero is and the enemy is once striked, the code above actually does work but it's from an old C#/XNA project.
I'm currently looking for the best way to call/implement the code into RGSS/3.
degree = radtodeg(arctan2(vec1.y - vec2.y, vec2.x - vec1.x));Now Vec1 and Vec2 are variables, 1 is for the hero, and 2 is for the enemy.
kd
I'm currently working on a seiken densetsu type of battle system, and so far everything seems to be going smoothly. But one thing I remembered is that some enemies would be pushed diagonally of course this is dependent of where the hero is and the enemy is once striked, the code above actually does work but it's from an old C#/XNA project.
I'm currently looking for the best way to call/implement the code into RGSS/3.