Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How to check if there are any other items on the same tile as a given item?  (Read 509 times)

bloop_bleep

  • Bay Watcher
    • View Profile

How do I do what the title says? I know that I could do some arithmetic to look up which block the item is in, that loop through all the items in that block, checking if the coordinates match, but I feel like there's an easier way.
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.