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
  • Dynamic Coordinates issue


    Zibele

    Recommended Posts

    Posted

    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?

    Posted

    you need to find a specific entity on the island that you can relate everything to, in terms of position. pest control had the same issue, and that was how i made a functioning script for it.

    Posted

    I think Player owned Houses have the same issue. Not sure how the construction and teletab scripts work around this.

    Posted

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

    Posted

    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

    Posted

    Interesting,is there no other way?

    Posted

    Interesting,is there no other way

    thats probably the simplest way. it's not that difficult to do (??)

    Posted

    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.

    Posted

    If you tell us what area you're working with, we can help more. I'm sure there's an entity in that area whose position doesn't change relative to other entities.

    Posted

    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.

    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.