FilthE 1 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.
Articron 746 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
Pseudo 179 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.
Xephy 237 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.
FilthE 1 Author 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.
Articron 746 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.