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
  • Automatically pass obstacles


    xVril
     Share

    Recommended Posts

    Hi, 

    I have been trying to figure this out.

    I have two entities:

    1. The local player.
    2. A moving NPC

    I want the local player to walk to the moving NPC, my issue is there may be obstacles. Normally in the past I have handled these obstacles individually. My issues here is these obstacles are dynamic game objects, so adding a specific tile is useless, they are passable.

    I have tried to add them as Passable Obstacles but still when walking to the NPC it makes no attempt to pass them.

    In Pseudo code I am assuming it would be something like this:

    if ( ObstacleExistsBetweenPointAandPointB)

    PassObstacle();

    Else 

    WalkToNPC() && InteractNPC();

    Any help would be much appreciated

     

     

     

     

    Edited by xVril
    Link to comment
    Share on other sites

    You could have an array of names/ids for your objects, then in your walking logic have a break clause if within X tiles of an object to deal with it?

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     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.