• Visit Rebornbuddy
  • CommonBehaviors.MoveAndStop and 3D distance

    Discussion in 'Community Developer Forum' started by iyake, Jun 17, 2016.

    1. iyake

      iyake Member

      Joined:
      Oct 19, 2014
      Messages:
      143
      Likes Received:
      5
      Trophy Points:
      18
      I'm think I'm running into an issue where moveandstop will terminate when it's within 2D distance of the target point, but the rest of the behavior relies on it being within 3d distance of the target. It's causing my behavior to lock up here, since moveandstop thinks its done when the rest of the behavior doesn't.

      is there a moveandstop that will keep going until it's within range of the target point in 3d?
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      How far away is the point on the Y axis, iirc we used 4.5f for the Y distance check. There was a reason why we chose this number but it was so long ago I don't remember off the top of my head.
       
    3. iyake

      iyake Member

      Joined:
      Oct 19, 2014
      Messages:
      143
      Likes Received:
      5
      Trophy Points:
      18
      One particular case is when approaching <153.8872, -9.001622, 77.50049> Yazel Ahuatan the Able from the east for the rank 1 Ixali quests.

      MoveAndStop will stop at <157.2142, -7.568106, 73.78784> with interactdistance of 5. Distance: 5.187255, Distance2D: 4.985243

      I had another issue with a moogles daily profile also, but didn't get that quest today.

      I actually just noticed the issue only comes up in the turnin tag, but not in pickup tag
       
    4. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Probably uses custom code before cb.ms was added. Not home atm.
       
    5. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83

      Try replacing the following in turnin.cs

      line 231
      Code:
      new Decorator(ret => Core.Me.Location.Distance(Position) <= InteractDistance && !Talk.ConvoLock && !SelectIconString.IsOpen,
      
      with

      Code:
      new Decorator(ret => Navigator.InPosition(Core.Player.Location,Position, InteractDistance) && !Talk.ConvoLock && !SelectIconString.IsOpen,
      
       
    6. iyake

      iyake Member

      Joined:
      Oct 19, 2014
      Messages:
      143
      Likes Received:
      5
      Trophy Points:
      18
      That's working, thanks
       
    7. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Thanks ill push out a new updated version soon.
       
    8. iyake

      iyake Member

      Joined:
      Oct 19, 2014
      Messages:
      143
      Likes Received:
      5
      Trophy Points:
      18
      same issue occurs with handover
       
    9. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,229
      Likes Received:
      364
      Trophy Points:
      83
      Thanks fixed that one aswell.
       

    Share This Page