"Arena on Wheels"
-Posted by Sorious
So somehow I would check the distance ( x / y ) between the players ( lets say it was 8 tiles ) and if it was more than this i could use those cases which move them back a tile based on direction?? *confused*
My original intent was to make it where they can step out of like 8 tiles of each other
Code:
int newZ;
if ( CheckMovement( d, out newZ ) )
{
int x = m_Location.m_X, y = m_Location.m_Y;
int oldX = x, oldY = y;
int oldZ = m_Location.m_Z;
switch ( d & Direction.Mask )
{
case Direction.North: --y; break;
case Direction.Right: ++x; --y; break;
case Direction.East: ++x; break;
case Direction.Down: ++x; ++y; break;
case Direction.South: ++y; break;
case Direction.Left: --x; ++y; break;
case Direction.West: --x; break;
case Direction.Up: --x; --y; break;
}
}You can look at this, you can find the direction with this and after the --x or whatever put a check if they are in the duel zone
So somehow I would check the distance ( x / y ) between the players ( lets say it was 8 tiles ) and if it was more than this i could use those cases which move them back a tile based on direction?? *confused*
My original intent was to make it where they can step out of like 8 tiles of each other