Count overlapping objects
Hello all.
I need to retrieve the number of objects overlapping a 'sensor' object as an action in a single event line, if it's possible.
Right now I'm using a bunch of events to start counting, increment a counter, detect when the counting should stop and stop the counting. It's clunky and I constantly have to tinker with it every time I change other parts of my app.
What I want is a single line that's basically "okay count them now", with a single counter update with the number of overlapping objects.
I hope this hasn't come up before as I've been running forum searches for 40 minutes trying to find an existing topic on it.
Re: Count overlapping objects
This should do the trick:
http://ext.neatwares.ath.cx/ext/Select_Object
Re: Count overlapping objects
Interesting. Thanks, I'll try that out.
Re: Count overlapping objects
Though I would recommend getting the most up-to-date version: here
Re: Count overlapping objects
Re: Count overlapping objects
I still don't see how I can simply select everything overlapping my sensor object. But I think if i spread a value range across my objects, I can iterate through the list and mark up the ones that overlap with a value. Then SelectObject can select all the ones with that value, right?
Re: Count overlapping objects
Okay I take that back, don't need that spread values at all. The ability to set my counter to NumSelectedByName is just the one-line action I needed. On to the next challenge.