JayC
Well-Known Member
Hey Devbest,
So the emulator I am using did not support one way gates, and I recoded most of the structure for them but I have a problem.
Now if I have it like this
It will work if you click after the gate.. but when I changed it to this:
It won't work at all.
Code 1 -> You have to click the space through the gate ----- So if it is setup like this:
You can't get in. So my attempt with the 2nd gate so so that if you double click it, it will set the gate to the tile after it (SquareInFront) and let the user go through.
Please help with this Spent 4 hours on this recoding these gates.
Thanks!
So the emulator I am using did not support one way gates, and I recoded most of the structure for them but I have a problem.
Now if I have it like this
Code:
if (User.IsWalking && (User.GoalX != Item.SquareInFront.X || User.GoalY != Item.SquareInFront.Y)) {
User.ClearMovement();
}
Code:
User.IsWalking = true;
User.GoalX = Item.SquareInFront.X;
User.GoalY = Item.SquareInFront.Y;
Code 1 -> You have to click the space through the gate ----- So if it is setup like this:
You can't get in. So my attempt with the 2nd gate so so that if you double click it, it will set the gate to the tile after it (SquareInFront) and let the user go through.
Code:
internal void ClearMovement()
{
IsWalking = false;
GoalX = 0;
GoalY = 0;
SetStep = false;
try
{
GetRoom().GetRoomUserManager().ToSet.Remove(new Point(SetX, SetY));
}
catch (Exception)
{
}
SetX = 0;
SetY = 0;
SetZ = 0.0;
if (!Statusses.ContainsKey("mv")) return;
Statusses.Remove("mv");
UpdateNeeded = true;
}
Thanks!