Jump to content
  • Can Condition with ObjectManager.Me.Position.DistanceTo is not working


    Findeh
    • Version: All Product: Quester Type: Bug Status: Not a Bug

    Tested with 1.12 (vanilla)

    I'm trying to use Follow Path with Can Condition like this:

    return (ObjectManager.Me.Position.DistanceTo2D(new Vector3(-5427.982, 300.8165, 398.1436)) < 20);


    And it's always return true, Bot always do this step.

    Even if he is 100 or 200 meters away from that Vector3, he do that step anyway.

    The idea is to skip follow path steps if Bot is to far away from them (have done it already during previous session). But bot do it again with that kind of condition.

    More then that. He do it with backward condition like that as well:

    return (ObjectManager.Me.Position.DistanceTo2D(new Vector3(-5427.982, 300.8165, 398.1436)) > 20);

    And same for: ObjectManager.Me.Position.DistanceTo(new Vector3(1, 2, 3))
    Same for: return (new Vector3(1, 2, 3).DistanceTo(ObjectManager.Me.Position) < 20);

    So it looks like the distance check with that methods is not working at all.

    I have tried to check distance to different objects, seems it works fine. So maybe problem is just with player / new vector position.



    User Feedback

    Recommended Comments

    Aha, that's explain alot. Thank you!
    Can you please explain alittle how should i use "if" step in quest order correctly, if i need to do "fork" construction (conditional operator), that will skip some steps. Something like this:
    [0] Do something
    [1] Do something
    [2] if (ObjectManager.Me.Position.DistanceTo2D(new Vector3(1, 2, 3)) < 20) then Go-to-step 30
    [3] Do something
    [4] Do something

    Maybe there is an example somewhere. Sorry for the stupid question.

    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

×
×
  • Create New...