June 22, 20178 yr So upon starting a script, I want the user to be able to enter a radius in form in integer. This will set a radius for e.g 15 tiles surrounding my player at the moment. The radius should be set, and never changed. How would I approach this with the api?
June 22, 20178 yr 5 minutes ago, Visty said: So upon starting a script, I want the user to be able to enter a radius in form in integer. This will set a radius for e.g 15 tiles surrounding my player at the moment. The radius should be set, and never changed. How would I approach this with the api? In onStart, create a custom GUI or just use a dialogue to get the radius value from the user. Then get the Area for that radius using: myPlayer().getArea(radius) And store it globally. Edited June 22, 20178 yr by Explv
June 22, 20178 yr Author 4 minutes ago, Explv said: myPlayer().getArea(radius) Thank you, appreciated Easier than I thought lol. Should have a better look at the api I guess kek Edited June 22, 20178 yr by Visty
June 22, 20178 yr If you're looking for a simple solution and don't want to go through the hassle of creating your own GUI, and this is the only data you want to input, consider using a JOptionPane. Just remember to check the data that's inputted and ensure that it's valid, and if not pop the option pane up again! -Apa
June 22, 20178 yr Author 3 hours ago, Apaec said: If you're looking for a simple solution and don't want to go through the hassle of creating your own GUI, and this is the only data you want to input, consider using a JOptionPane. Just remember to check the data that's inputted and ensure that it's valid, and if not pop the option pane up again! -Apa Thank you for your post. I've sorted out the GUI. Just wanted to know how to get the area, store it in a variable, then access it to my tasks. Nevertheless, I appreciate your post
Create an account or sign in to comment