FilthE 1 Share Posted February 2, 2018 So if I define an Area with myLocation = getLocalPlayer().getTile(); myArea = Area.generateArea(x, myLocation); then try to draw it with g.drawPolygon(myArea.getPolygonArea()); I get nothing at all. I can draw the myLocation tile just fine but I really need the area around that tile. Link to comment Share on other sites More sharing options...
Articron 738 Share Posted February 2, 2018 Drawing an area (or multiple things at a time) is generally a problem with Dreambot What you can try is to loop through all tiles of that Area (Area#getTiles) and draw the polygons individually Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted February 2, 2018 What Articron said would probably works, though why would you want to do this? And I'd imagine that it could be quite resource hungry. Link to comment Share on other sites More sharing options...
Xephy 237 Share Posted February 2, 2018 if (getMap().isTileOnMap(The nearest tile to your area)) { for (Tile t : yourArea.getTiles()) { *your paint graphics var here*.drawPolygon(getMap().getPolygon(t)); } } Can confirm arti's solution works. Link to comment Share on other sites More sharing options...
FilthE 1 Author Share Posted February 3, 2018 Just got home to try and see if it would work and I can definitely say thank you guys, it works like a charm. Link to comment Share on other sites More sharing options...
Articron 738 Share Posted February 3, 2018 if (getMap().isTileOnMap(The nearest tile to your area)) { for (Tile t : yourArea.getTiles()) { *your paint graphics var here*.drawPolygon(getMap().getPolygon(t)); } } Can confirm arti's solution works. OFC IT WORKS I'M ME Link to comment Share on other sites More sharing options...
cammofunk 2 Share Posted March 29, 2018 OFC IT WORKS I'M ME Works like a charm, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.