1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved Failed interaction with Interactble behind mini map

Discussion in 'Developer Support' started by SilenceP44, Aug 18, 2017.

Tags:
  1. SilenceP44

    Joined:
    Jun 8, 2017
    Messages:
    184
    Likes Received:
    87
    Bug & Question:
    I use a lot of code that looks somewhat like this:
    if (!BankChest.isVisible()) {
    Camera.turnTo(BankChest);
    Execution.delayUntil(BankChest::isVisible, 100, 5000);
    }​

    This works great most of the time but I have run into a problem:
    When not playing on fixed modus the bot will try to click the object that is behind the mini map and fail. The camera doesn't turn to an angle where it would be visible because it thinks it is already visible and the bot gets stuck.

    Ex: if the bot would try to go up the ladder in lumbridge in this situation
    [​IMG]
    Imgur: The most awesome images on the Internet

    Is there any work around to force the movement of the camera to an angle where it is able to interact with the object if the object is behind the mini map?

     
  2. Best Answer:
    Post #3 by Snufalufugus, Aug 18, 2017
  3. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    This is a known problem but there aren't any plans to add a fix for it as I hear it would be too heavy.

    You can fix this by adding code to your bot to turn the camera when interaction fails, for example:

    Code (Text):
    1.  
    2. if (entity.interact("This") {
    3. } else {
    4. Camera.turnTo(entity);
    5. }
    6.  
     
  4. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    Bug - OSRS - Resizeable mode minimap can cover Entities and they're still considered visible

    Best workaround I've found is to walk towards any entity more than 5 units of distance away from your player, regardless of whether or not the entity is "Visible". This will bring the entity towards the middle of your screen, and out from under the minimap.
    --- Double Post Merged, Aug 18, 2017, Original Post Date: Aug 18, 2017 ---
    I tagged you Auxi because your code won't work since the entity is already "Visible"

    Edit: Please continue to read the thread entirely.
     
    #3 Snufalufugus, Aug 18, 2017
    Last edited: Aug 18, 2017
  5. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    Please elaborate @Snufalufugus

    I use that type of rotating in my interaction class and it helps me get out of every situation where an RS3 interface is covering an entity.

    Code (Text):
    1.  
    2. } else if (entity.isVisible()) {
    3.     if (entity.interact(action)) {
    4.         return true;
    5.     } else {
    6.         Camera.concurrentlyTurnTo(entity, Random.nextDouble(0.4, 0.849));
    7.     }
    8.  
     
    #4 auxi, Aug 18, 2017
    Last edited: Aug 18, 2017
  6. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    I would say it's probably the random pitch fixing the problem, because AFAIK turning the camera to something already visible won't turn the camera.
    --- Double Post Merged, Aug 18, 2017, Original Post Date: Aug 18, 2017 ---
    According to Auxi, Camera.concurrentlyTurnTo(thing) will essentially center the thing on your screen, regardless of whether or not it was originally visible. I'll try it out tonight and report back. This would definitely be better than walking towards the thing.
     
  7. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    I'll post what I said to Snufalufugus on slack:

    For me it moves the camera to a more appropriate angle eventhough it's already 'visible'. So definitely feel free to try out what I posted earlier :D
     
  8. SilenceP44

    Joined:
    Jun 8, 2017
    Messages:
    184
    Likes Received:
    87
    Thanks for the responses! This was my first idea but it seemed a bit messy to solve it that way, will try to solve it now .
     
  9. auxi

    Joined:
    May 24, 2016
    Messages:
    1,113
    Likes Received:
    990
    I agree it's messy if you put it after every .interact in your code, but in an interaction class it's quite nice.
     

Share This Page

Loading...