SigmaDev 0 Share Posted April 26, 2022 Any thoughts on getting the loot tile for a larger NPC (Something like a Cow) Just started playing with this API yesterday and wondered about getting your loot but logging the tile of the NPC you're killing but the loot isn't guaranteed to drop there. I'm imagining I need to take orientation into consideration and what tiles the NPC is occupying but wondered if anyone had done this before I threw some maths at the wall until it worked Link to comment Share on other sites More sharing options...
camelCase 229 Share Posted April 26, 2022 loot always drops on the south west tile iirc, idk what tile getTile method gets Link to comment Share on other sites More sharing options...
SigmaDev 0 Author Share Posted April 26, 2022 12 minutes ago, camalCase said: loot always drops on the south west tile iirc, idk what tile getTile method gets I'll look into that, thanks Link to comment Share on other sites More sharing options...
SigmaDev 0 Author Share Posted April 26, 2022 (edited) Think you remember correctly about the south west and getTile seems to get a tile of the NPC but never the tile the loot will land on. Trying to see if there's a method in the docs for getting all tiles an NPC occupies to easily get the south west, but I think no such method exists and I'll have to do some maths based off of orientation. Edited April 26, 2022 by SigmaDev Link to comment Share on other sites More sharing options...
abuseedom3 4 Share Posted April 28, 2022 Grounditems.closest??? Link to comment Share on other sites More sharing options...
SigmaDev 0 Author Share Posted April 28, 2022 5 hours ago, abuseedom3 said: Grounditems.closest??? Wanted to ensure the loot was from my kill and not one from someone else that happened to be closer Link to comment Share on other sites More sharing options...
holic 233 Share Posted April 28, 2022 On 4/26/2022 at 2:31 PM, SigmaDev said: Think you remember correctly about the south west and getTile seems to get a tile of the NPC but never the tile the loot will land on. Trying to see if there's a method in the docs for getting all tiles an NPC occupies to easily get the south west, but I think no such method exists and I'll have to do some maths based off of orientation. I thought the same too but it really is just Tile lootTile = new Tile(npcTile.getX() - 1, npcTile.getY() - 1); Link to comment Share on other sites More sharing options...
SigmaDev 0 Author Share Posted April 29, 2022 17 hours ago, holic said: I thought the same too but it really is just Tile lootTile = new Tile(npcTile.getX() - 1, npcTile.getY() - 1); That's exactly what I ended up doing yesterday and it seems to be fine, think I was just over thinking it originally, but thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now