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
Dreampathfinder PlusEMU
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="Core" data-source="post: 395205" data-attributes="member: 72270"><p>You could iterate through the steps around the user? Like so;</p><p></p><p>Was wrote on devbest so recommend re writing as just used loads of spaces lol</p><p>[code]</p><p>public Point GetTileAroundUser(Point Coord)</p><p>{</p><p> for(int X = -1; X <= 1; X++)</p><p> {</p><p> for(int Y = -1; Y <= 1; Y++)</p><p> {</p><p> if(IsValidStep(Coord.X + X, Coord.Y + Y))</p><p> {</p><p> return new Point(Coord.X + X, Coord.Y + Y);</p><p> }</p><p> }</p><p> }</p><p> return null;</p><p>}[/code]</p></blockquote><p></p>
[QUOTE="Core, post: 395205, member: 72270"] You could iterate through the steps around the user? Like so; Was wrote on devbest so recommend re writing as just used loads of spaces lol [code] public Point GetTileAroundUser(Point Coord) { for(int X = -1; X <= 1; X++) { for(int Y = -1; Y <= 1; Y++) { if(IsValidStep(Coord.X + X, Coord.Y + Y)) { return new Point(Coord.X + X, Coord.Y + Y); } } } return null; }[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Dreampathfinder PlusEMU
Top