Just checking to see if BYOND has a quick built in way of getting all the contents of a Z level?
So I can basically say "for(objs in level)", where level is the Z value?
ID:162067
![]() Feb 28 2008, 12:47 pm
|
|
Not what he wanted, and var/obj/list/ZContents shouldn't even compile.
block() is the closest to what Obs wants. |
Except block returns the contents of a 3D area, right? So that would return all of the Z levels instead of a specific one.
Looping through the objs in the world and checking for the right Z level should work. |
Please read the Reference entry for block() again. And looping through EVERY SINGLE THING IN THE GAME is never a good idea.
|
Except I'm not just looking for any obj, I'm specifically looking for a specifc type of object. There may be a lot of that type of object in the world, but certainly not anywhere near the amount of total objects in the world.
Or does BYOND loop through everything anyway regardless of the type? |
If it's an operation you're going to be performing often, you're just better off keeping a bunch of lists yourself to keep track of them.
|
If I didn't make any mistakes that should return a list of all the objs on level