Jump to content

Picking up Items


Recommended Posts

Posted

What class or method is used for picking up items? I can't seem to find anything in the API...I thought groundItems would have something, but doesn't look like there's much there. Objects looks good, but I don't see anything that has the specific function of picking up a ground item. Is the best way just using closest(item id) and then interact? If that is the case, what exactly does distance entail for the closest methods? What is real distance vs. pythagoras vs. absolute?

 

Thanks

Posted (edited)

What class or method is used for picking up items? I can't seem to find anything in the API...I thought groundItems would have something, but doesn't look like there's much there. Objects looks good, but I don't see anything that has the specific function of picking up a ground item. Is the best way just using closest(item id) and then interact? If that is the case, what exactly does distance entail for the closest methods? What is real distance vs. pythagoras vs. absolute?

 

Thanks

If groundItems isn't looking good for you i'm very very concerned.

 GroundItem loot = groundItems.closest("Bones");
        if(loot != null){
            //more cool checks
            loot.interact("Take");
            //badass sleep timer
        } 

Will find the closest groundItem named bones if it exists

Edited by Isolate
  • Like 1
Posted

Haha, I guess I just don't really know how to interpret API documentations then. So, the GroundItems class inherits all the Entity methods like closest? I guess I;m confused by all the lingo like differences between objects, entities, and groundItems. Isn't a ground item an object?

no object is an object, like a door, gate, fence, bank booth

Posted

Haha, I guess I just don't really know how to interpret API documentations then. So, the GroundItems class inherits all the Entity methods like closest? I guess I;m confused by all the lingo like differences between objects, entities, and groundItems. Isn't a ground item an object?

 

Object is its own thing. An object is something like A tree, ore vein, a door, things like that. A ground item is anything that is on the ground and has orange text.

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...