dreww 1 Posted March 29, 2018 As the title says, the interact() function missclicks as such: https://i.imgur.com/6MjpeDc.gifv GameObject rope = getGameObjects().getTopObjectOnTile(new Tile(2141, 4239, 3)); if(rope != null){ log("found rope"); rope.interact("Climb"); } furthermore, if I replace the first line with following, the object is never found GameObject rope = getGameObjects().closest("Rope");
AsBakedAsCake 203 Posted March 30, 2018 Edit: Every time I try to post something, I get roasted so del. this comment. Thx. Seriously: If you're a scripter, and you don't agree with a suggestion I make/it's not the right suggestion: Why don't you just educate everyone on the thread how to do things properly? Rather than just responding "LOL" or harassing me for months over something stupid like dropping the black axe in my first script.
Manly 879 Posted March 30, 2018 Try making rope into a private static final: Private Static Final String ROPE = "Rope" May or may not work, worth a shot. LOL what would this do
AsBakedAsCake 203 Posted March 30, 2018 LOL what would this do You're the one with rank, you should be giving advice, not trying to roast me. "May or may not work" Why don't you go ahead and tell us what to do then Man16, educate us. I mean after all you're the one with more knowledge, so share it instead of coming at me like that. Because personally, I find your comment pretty useless? Edit: At I least took the effort to make a suggestion instead of making a 5 word post that is completely and entirely useless.
RetroBot 35 Posted March 30, 2018 Have you tried using the id of the object? When you use GameObject rope = getGameObjects().closest("Rope"); is it returning null or just not interacting with the rope?
Nuclear Nezz 2063 Posted March 30, 2018 The interaction isn't misclicking, something in the menu is not matching up correctly. You could go through each of the objects on the tile, rather than just grabbing the first. Or you could use the game debugger and see what that shows when you check game objects. You can also use entity hover to make sure the rope is what you think it should be.
Nex 2546 Posted March 30, 2018 Seem like the default action is what u need so may aswell just click the object ^.^ GameObject rope = m.getGameObjects().getTopObjectOnTile(new Tile(2141, 4239, 3)); if (rope != null) { getMouse().click(rope); // sleep.. }
dreww 1 Author Posted March 30, 2018 Have you tried using the id of the object? When you use GameObject rope = getGameObjects().closest("Rope"); is it returning null or just not interacting with the rope? Returns null when I use this. Seem like the default action is what u need so may aswell just click the object ^.^ GameObject rope = m.getGameObjects().getTopObjectOnTile(new Tile(2141, 4239, 3)); if (rope != null) { getMouse().click(rope); // sleep.. } This works but occasionally it'll missclick other objects cause the camera is angled oddly, so I would love to find a solution to the issue as well. Thanks. The interaction isn't misclicking, something in the menu is not matching up correctly. You could go through each of the objects on the tile, rather than just grabbing the first. Or you could use the game debugger and see what that shows when you check game objects. You can also use entity hover to make sure the rope is what you think it should be. Tried the following, which logged a couple dozen null's. This seems like something that shouldn't be happening for(int i = 0; i<getGameObjects().all().size(); i++) { log(getGameObjects().all().get(i).getName()); }
Manly 879 Posted March 30, 2018 Returns null when I use this. Tried the following, which logged a couple dozen null's. This seems like something that shouldn't be happening for(int i = 0; i<getGameObjects().all().size(); i++) { log(getGameObjects().all().get(i).getName()); } getName can return null. For example, there are misc gameobjects near the gnome agility course which are still gameobjects but arent given a name.
dreww 1 Author Posted March 30, 2018 getName can return null. For example, there are misc gameobjects near the gnome agility course which are still gameobjects but arent given a name. They ALL return null though, which seems odd.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.