- You're not checking for height.
- You're not checking for object type.
- It's possible you're one coordinate off from the true location as doors are "odd" objects and appear "between" tiles.
|
In the exotic server I am using this method
To get a WorldObject at the location.Code:public WorldObject getObjectAtLocation(Location3D location) { Region region = getRegion(location.getX(), location.getY()); if (region == null) { return null; } for (WorldObject worldObject : worldObjects.get(region.id)) { if (worldObject.x == location.getX() && worldObject.y == location.getY() && worldObject.height == location.getZ()) { return worldObject; } } return null; }
I try to get the object at location (3244, 3216) which is the right church door of the church in lumbridge.
I get an object, but when I get the object name it says that it's null, while it definitely isn't.
I'm trying to make double doors working and when I use this method in vencillio base, then the name isn't null, so there is something that fucks it up.
- You're not checking for height.
- You're not checking for object type.
- It's possible you're one coordinate off from the true location as doors are "odd" objects and appear "between" tiles.
- You're not checking for height.
This is height, right?
&& worldObject.height == location.getZ()- You're not checking for object type.
Did this plus checking for faces. WORKS!- It's possible you're one coordinate off from the true location as doors are "odd" objects and appear "between" tiles.
No problem with this
Thank you for the help!
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |