SigmaDev 0 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
camelCase 304 Posted April 26, 2022 loot always drops on the south west tile iirc, idk what tile getTile method gets
SigmaDev 0 Author 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
SigmaDev 0 Author Posted April 26, 2022 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.
SigmaDev 0 Author 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
holic 237 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);
SigmaDev 0 Author 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!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.