Jump to content

Area values


Recommended Posts

Posted
final Area YEW_AREA = new Area(3202,3498,3223,3506);

Hi,

 

I have a quick question.

 

Is the Area build on just random tiles around your player? Or what is the adviced way to get the values?

 

Many thanks.

 

That area will be positioned between the two coordinates you just defined it as --> 3202,3498 and 3223,3506

Wether your player is in that current area or not, the area will keep existing ofcourse.

 

I'm not quite sure what your question is so if this hasn't helped you, please tell me.

Posted (edited)

Your question doesn't really make sense, but you basically add the opposite corners of a rectangle/square.

 

So you get those coordinates from the game and you place them in the correct place as "x1, y1, x2,  y2"

 

rectangle-fig1.gif

 

final Area YEW_AREA = new Area(x1, y1, x2,  y2);

Edited by Vilius
Posted (edited)

Ok, thanks.

 

The question actually is how to get the values of x1, y1, x2, y2

 

Do you just move your player to the location and get the values of the tile where it stands?

 

Move your mouse to one corner tile and get x1 and y1, then move your mouse to opposite corner tile and get x2, y2.

Edited by Nora

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...