Jump to content
This site uses cookies! Learn More

This site uses cookies!

By continuing to use this site, you agree to allow us to store cookies on your computer. :)

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

    Share this comment


    Link to comment
    Share on other sites


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...