nyan Posted April 22, 2015 Share Posted April 22, 2015 (edited) public PolygonArea test = new PolygonArea(); this is as far as i got. would be really cool to use some polygons instead of the boring old area boxes i'm using right now. also if anyone knows how to detect when the player is stunned (for thieving release) and how to tell which gyr falcon is mine (detecting the yellow arrow above it, for a hunter release) edit: just incase it's unclear i want to add points to make a polygon not just declare it like i've already done. Edited April 22, 2015 by shiny greninja Quote Link to comment Share on other sites More sharing options...
Novak Posted April 22, 2015 Share Posted April 22, 2015 (edited) just do Area area = new Area(new Position[] {add your positions here}); or you can make the position array a variable and do it that way Edited April 22, 2015 by Novak Quote Link to comment Share on other sites More sharing options...
Precise Posted April 22, 2015 Share Posted April 22, 2015 (edited) use any of the following parameters: So: PolygonArea poly = new PolygonArea(new Position[] {new Position(1,1,0), new Position(1,1,0), new Position(1,1,0)}); change the positions and add more etc :P Edited April 22, 2015 by Precise Quote Link to comment Share on other sites More sharing options...
nyan Posted April 22, 2015 Author Share Posted April 22, 2015 use any of the following parameters: So: PolygonArea poly = new PolygonArea(new Position[] {new Position(1,1,0), new Position(1,1,0), new Position(1,1,0)}); change the positions and add more etc thanks this is exactly what i was looking for i'm still new to osbot's api. it's almost identical to others but some things are done slightly differently. this was one of them. thanks again! just do Area area = new Area(new Position[] {add your positions here}); or you can make the position array a variable and do it that way thanks for the fast reply! 2 different reputable responses, now i can't decide which one to use. i could use both since there's 2 different polygons in the location i'm finishing (for dat rooftop script haha) Quote Link to comment Share on other sites More sharing options...
FrostBug Posted April 24, 2015 Share Posted April 24, 2015 For stun detection there is probably a config variable. But if you don't want to go into that, you can simply check the height of your players model (the stun particles become part of the player model, I assume). Something like myPlayer().getModelHeight() > defaultHeight. You'll have to check what the default model height is for your player while it's not stunned. This may differ depending on hair/helm, though. Alternatively, check the verticecount on the model. Quote Link to comment Share on other sites More sharing options...