bigbotbud 0 Share Posted February 1, 2016 - I have my widget defined: private final WidgetChild TEST = getWidgets().getChildWidget(Parent, Child); (actual numbers not names). - I then used the widget in an if statement: if(TEST != null && TEST.isVisible()){ TEST.interact("Make X"); getKeyboard().type("28"); } sleepUntil(new Condition(){ public boolean verify(){ return !getInventory().contains(item); } },2000); } else { getInventory().interact("item", "Use"); GameObject furnace = getGameObjects().closest("Entity"); Entity.interact("use"); } - All that happens, is the script keeps using the item onto the entity and once the interface pops up it uses the item and puts it up where the entity would be, it does not recognize the interface. Link to comment Share on other sites More sharing options...
qbots 239 Share Posted February 1, 2016 Are you getting the widget every loop? Link to comment Share on other sites More sharing options...
infallible 28 Share Posted February 2, 2016 - I have my widget defined: private final WidgetChild TEST = getWidgets().getChildWidget(Parent, Child); (actual numbers not names). - I then used the widget in an if statement: if(TEST != null && TEST.isVisible()){ TEST.interact("Make X"); getKeyboard().type("28"); } sleepUntil(new Condition(){ public boolean verify(){ return !getInventory().contains(item); } },2000); } else { getInventory().interact("item", "Use"); GameObject furnace = getGameObjects().closest("Entity"); Entity.interact("use"); } - All that happens, is the script keeps using the item onto the entity and once the interface pops up it uses the item and puts it up where the entity would be, it does not recognize the interface. Have you logged anything to see if it's returning what you want? Try logging the widget, I've personally never logged a widget, but it may come back with something different. Link to comment Share on other sites More sharing options...
bigbotbud 0 Author Share Posted February 2, 2016 Thank you to all that helped, my issue has been resolved. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.