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
  • Try asking for help in the chatbox
  • Dynamic Coordinates issue


    Zibele
     Share

    Recommended Posts

    Hey guys,i was writing a script on a minigame and each time i enter an instance of this minigame the coordinates of the specific spot within the instance would change?Could someone help me on how i would go about pathing dynamic coordinates?

    Link to comment
    Share on other sites

    How would i relate the entity in terms of position if coordinates keep changing?

     

    you get the entity's position when you first enter the instance, and instead of using direct tile numbers, shift your tiles and areas proportionally to the entity's position

     

    e.g. 

    walk(entity.getX() - 10, entity.getY() + 5, 0) //very basic example

    Link to comment
    Share on other sites

    The entities are also dynamic,and i need to create a area within the instance to solve the instance,so yeah that probably wont be enough,but i will figure it out.

    Link to comment
    Share on other sites

    Interesting,is there no other way?

     

     

    There is a few ways you can do it, but as @Im A Baller was saying, using a GameObject as reference and offsetting your positions from that object would probably be easiest. If you know a bit of programming and math, you could create your own local pathfinder using the loaded tile region. But it's much more work than simply offsetting them.

    Link to comment
    Share on other sites

     Share

    ×
    ×
    • 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.