Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[Help] One Way Gates
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JayC" data-source="post: 377234" data-attributes="member: 36373"><p>Hey Devbest,</p><p>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.</p><p></p><p>Now if I have it like this</p><p>[CODE]</p><p>if (User.IsWalking && (User.GoalX != Item.SquareInFront.X || User.GoalY != Item.SquareInFront.Y)) {</p><p>User.ClearMovement();</p><p>}</p><p>[/CODE]</p><p>It will work if you click after the gate.. but when I changed it to this:</p><p>[CODE]</p><p>User.IsWalking = true;</p><p>User.GoalX = Item.SquareInFront.X;</p><p>User.GoalY = Item.SquareInFront.Y;</p><p>[/CODE]</p><p>It won't work at all.</p><p></p><p>Code 1 -> You have to click the space through the gate ----- So if it is setup like this:</p><p><img src="http://image.prntscr.com/image/586417fec09549d29737ee601d322380.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>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.</p><p></p><p>[CODE]</p><p>internal void ClearMovement()</p><p> {</p><p> IsWalking = false;</p><p> GoalX = 0;</p><p> GoalY = 0;</p><p> SetStep = false;</p><p> try</p><p> {</p><p> GetRoom().GetRoomUserManager().ToSet.Remove(new Point(SetX, SetY));</p><p> }</p><p> catch (Exception)</p><p> {</p><p> }</p><p> SetX = 0;</p><p> SetY = 0;</p><p> SetZ = 0.0;</p><p></p><p> if (!Statusses.ContainsKey("mv")) return;</p><p> Statusses.Remove("mv");</p><p> UpdateNeeded = true;</p><p> }</p><p>[/CODE]</p><p>Please help with this <img src="/styles/default/xenforo/smilies/emojione/frown.png" class="smilie" loading="lazy" alt=":(" title="Frown :(" data-shortname=":(" /> Spent 4 hours on this recoding these gates.</p><p></p><p>Thanks!</p></blockquote><p></p>
[QUOTE="JayC, post: 377234, member: 36373"] 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 [CODE] if (User.IsWalking && (User.GoalX != Item.SquareInFront.X || User.GoalY != Item.SquareInFront.Y)) { User.ClearMovement(); } [/CODE] It will work if you click after the gate.. but when I changed it to this: [CODE] User.IsWalking = true; User.GoalX = Item.SquareInFront.X; User.GoalY = Item.SquareInFront.Y; [/CODE] It won't work at all. Code 1 -> You have to click the space through the gate ----- So if it is setup like this: [IMG]http://image.prntscr.com/image/586417fec09549d29737ee601d322380.png[/IMG] 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; } [/CODE] Please help with this :( Spent 4 hours on this recoding these gates. Thanks! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[Help] One Way Gates
Top