December 17, 20169 yr So it seems all of these can work the same: RS2Object tree1 = objects.closest("Oak"); Entity tree2 = objects.closest("Oak"); NPC tree3 = npcs.closest("Oak"); What are the differences if they all accomplish the same job of finding the closest oak tree? [What is the right tool for the job?] Continuing on it looks like they all can be interactable: tree.interact("Chop Down"); tree2.interact("Chop Down"); tree3.interact("Chop Down"); Again what is the right tool for the job if they all do the same thing?
December 17, 20169 yr http://osbot.org/forum/topic/93981-guidetypes-of-entities-and-how-to-use-them-correctly/
December 18, 20169 yr Author http://osbot.org/forum/topic/93981-guidetypes-of-entities-and-how-to-use-them-correctly/ Well that was easy, thanks.
December 18, 20169 yr Entity is the super class, meaning that RS2Object and NPC both extend it. Don't use the super class unless you know what you're doing; the OSBot API makes a lot of convenient decisions based on the child type (especially in interactions).
Create an account or sign in to comment