April 28, 20178 yr I've seen this in other scripts, where you click the Entity when the script starts. However input is disabled by default when a script is running, how can i change this?
April 28, 20178 yr >onMouseClick >iterate all objects/npcs/etc >>if mouse click point is within the Entity model >>get that entity Similar concept as showing/hiding paint on screen with a mouse click. User input doesn't have to be enabled.
April 28, 20178 yr Like the way I have it in all my scripts? It's all Java API for Swing/AWT, human input is not necessary.
April 28, 20178 yr Author 24 minutes ago, Alek said: Like the way I have it in all my scripts? It's all Java API for Swing/AWT, human input is not necessary. I've only used your woodcutter, but yeah pretty much like that. When the script starts you click the tree you want and it gets that entity, how is that not user input? Currently I can get the entity on cursor, highlight it with paint, set it to interact with mouse click. Only thing I'm missing is the ability to move the mouse around.
April 28, 20178 yr https://osbot.org/api/org/osbot/rs07/Bot.html#addMouseListener-java.awt.event.MouseListener-
April 28, 20178 yr Author Just now, Final said: You cache the first entity/name of entity (whatever you want) they select. 1 minute ago, Final said: they select. Anyway, I'm trying out mouse listener. Hopefully its what I'm looking for. 38 minutes ago, liverare said: https://osbot.org/api/org/osbot/rs07/Bot.html#addMouseListener-java.awt.event.MouseListener- Hey it works, thanks buddy!
Create an account or sign in to comment