Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Accurate models for clicking


    fonrus

    Recommended Posts

    I seem to be having troubles getting the correct model for clicking on animating/post animation game objects.

     

    First a working model: Here you can see it will give a valid point to click on the object.

    SOUL7IM.png

     

    Here is the same object after its animation (ID changes)

    93ipZFd.png

    yHQ8lEo.png

    gameObject.getClickablePoint() does not work well at all in this case.

     

    what is the best way around this? Is there a way to update the model to where it actually is in the animation?

     

     

    - Fonrus

    Link to comment
    Share on other sites

    I seem to be having troubles getting the correct model for clicking on animating/post animation game objects.

     

    First a working model: Here you can see it will give a valid point to click on the object.

    SOUL7IM.png

     

    Here is the same object after its animation (ID changes)

    93ipZFd.png

    yHQ8lEo.png

    gameObject.getClickablePoint() does not work well at all in this case.

     

    what is the best way around this? Is there a way to update the model to where it actually is in the animation?

     

     

    - Fonrus

     

    How do you get that wire frame effect?

    Link to comment
    Share on other sites

    does the id change once it has been set?

    The id does indeed change, but that is the model for the new id.

    How do you get that wire frame effect?

    In your script you can do something as such:

    
    //@ScriptManifest(...)
    public class myScript extends AbstractScript(){
        public GameObject go;
    
        public int onLoop(){
            go = this.getGameObjects().getTopObjectOnTile(new Tile(xxx,xxx,0));
        }
    
        public void onPaint(Graphics g){
            go.getModel().drawWireFrame(g);
        }
    
    }
    
    Link to comment
    Share on other sites

    Rather than doing getTopObjectOnTile, do a closest(filter) that just grabs an object on a tile. so object->object != null && object.getTile().equals(new Tile(xxxx,xxxx,0))

     

    There are problems with getTopObjectOnTile sometimes, and it grabs a bad reference.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.