Thread: Object Distance checks

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35
  1. #1 Object Distance checks 
    Registered Member
    Nando's Avatar
    Join Date
    Feb 2009
    Age
    26
    Posts
    3,518
    Thanks given
    2,437
    Thanks received
    1,107
    Rep Power
    5000
    Code:
    private Map<String, Object> temporaryAttributes;
    100% credit to: jack daniels


    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Officially Retired

    Huey's Avatar
    Join Date
    Jan 2008
    Age
    19
    Posts
    16,489
    Thanks given
    3,387
    Thanks received
    7,726
    Rep Power
    5000
    Good work glad I helped you out now I see that it works fine gj son

    Listen children don't become this guy.
    Quote Originally Posted by Owner Spikey View Post
    Why can I attack lower level npc's in a matter of a mouse hover but for a higher level npc the only choice to attack is by right clicking option attack?

    Reply With Quote  
     

  4. #3  
    Registered Member

    Join Date
    Feb 2012
    Posts
    901
    Thanks given
    96
    Thanks received
    480
    Rep Power
    654
    And what, exactly, is wrong with using a distance check for object actions (when you include the object's size)?
    Chris Fletcher
    Economist & Hobbyist Developer
    Reply With Quote  
     

  5. #4  
    Registered Member
    Nando's Avatar
    Join Date
    Feb 2009
    Age
    26
    Posts
    3,518
    Thanks given
    2,437
    Thanks received
    1,107
    Rep Power
    5000
    Quote Originally Posted by Chris Fletcher View Post
    And what, exactly, is wrong with using a distance check for object actions (when you include the object's size)?
    they use sizeX and sizeY and they are both different for some objects and if u use withinDistance ull be able to execute from farther away
    and not where your player stops at. just doesn't work out

    Quote Originally Posted by Tupac View Post
    Good work glad I helped you out now I see that it works fine gj son


    Reply With Quote  
     

  6. #5  
    Registered Member

    Join Date
    Feb 2012
    Posts
    901
    Thanks given
    96
    Thanks received
    480
    Rep Power
    654
    Quote Originally Posted by Nando View Post
    they use sizeX and sizeY and they are both different for some objects and if u use withinDistance ull be able to execute from farther away
    and not where your player stops at. just doesn't work out
    My question remains, maybe you misunderstood it:

    Quote Originally Posted by Chris Fletcher View Post
    And what, exactly, is wrong with using a distance check for object actions (when you include the object's size)?
    Chris Fletcher
    Economist & Hobbyist Developer
    Reply With Quote  
     

  7. #6  
    Registered Member
    Nando's Avatar
    Join Date
    Feb 2009
    Age
    26
    Posts
    3,518
    Thanks given
    2,437
    Thanks received
    1,107
    Rep Power
    5000
    Quote Originally Posted by Chris Fletcher View Post
    My question remains, maybe you misunderstood it:
    because actions can start behind others like walls, and I just tested that with bank booths/trees and it's not right.
    This way is simpler


    Reply With Quote  
     

  8. #7  
    Registered Member

    Join Date
    Feb 2012
    Posts
    901
    Thanks given
    96
    Thanks received
    480
    Rep Power
    654
    Quote Originally Posted by Nando View Post
    because actions can start behind others like walls, and I just tested that with bank booths/trees and it's not right.
    This way is simpler
    And how would these lines of code prevent you from starting an action while there's e.g. a wall in between the player and the object?
    Chris Fletcher
    Economist & Hobbyist Developer
    Reply With Quote  
     

  9. #8  
    Registered Member
    Nando's Avatar
    Join Date
    Feb 2009
    Age
    26
    Posts
    3,518
    Thanks given
    2,437
    Thanks received
    1,107
    Rep Power
    5000
    Quote Originally Posted by Chris Fletcher View Post
    And how would these lines of code prevent you from starting an action while there's e.g. a wall in between the player and the object?
    It doesn't, this just doesn't stop when your within a distance that may be wrong and instead stops when your pathfinder reaches the object.


    Reply With Quote  
     

  10. #9  
    Registered Member

    Join Date
    Feb 2012
    Posts
    901
    Thanks given
    96
    Thanks received
    480
    Rep Power
    654
    Quote Originally Posted by Nando View Post
    It doesn't, this just doesn't stop when your within a distance that may be wrong and instead stops when your pathfinder reaches the object.
    Ah, now I understand what you mean. Okay then.
    Chris Fletcher
    Economist & Hobbyist Developer
    Reply With Quote  
     

  11. Thankful user:


  12. #10  
    Banned

    Join Date
    Nov 2009
    Posts
    4,222
    Thanks given
    2,950
    Thanks received
    1,362
    Rep Power
    0
    Nice job, hopefully that helps people.

    Bet you got the idea to do this from our tutorial island video.
    Reply With Quote  
     

Page 1 of 4 123 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] Long-distance Object Click [HELP]
    By Compaq in forum Help
    Replies: 5
    Last Post: 03-20-2013, 06:21 PM
  2. [PI HELP] distance from object
    By 25thHour in forum Help
    Replies: 3
    Last Post: 10-24-2012, 01:50 PM
  3. Replies: 37
    Last Post: 04-29-2012, 11:03 AM
  4. Object click distance problem
    By Nighel in forum Help
    Replies: 0
    Last Post: 04-05-2012, 02:57 PM
  5. PI Object Distance
    By Jason in forum Help
    Replies: 3
    Last Post: 05-22-2011, 05:18 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •