Is it possible?
like say i wanto get a list of mobs west of the character.
That would return a list of turfs, you'd have to loop over those turfs in a second loop to get the mobs within them.
|
when i replace block with world i get that it is a bad proc T.T and also Nadrew how would i do that?
|
In response to Nadrew
|
|
Nadrew wrote:
That would return a list of turfs, you'd have to loop over those turfs in a second loop to get the mobs within them. Herp derp. Of course. I always make that mistake. @goku You would just change var/mob/m to var/turf/t and then use for(var/mob/m in t.contents) moblist += m That way you're checking the contents of each turf in block(). |
Hmm
for(var/turf/T in block( locate( user.x, user.y - 375/2, user.z ), locate( user.x + 375, user.y + 375/2, user.z) )) So far.. this is not even returning a list of turfs for me.. |
If you wanted to know how you would go about doing so, you could use block() and a for() loop to find the mobs, if you just want every mob to a certain direction, you just replace block() with world and check the x, y, and z vars to see if they're in the appropriate direction.
A quick example:
This would return a list of mobs to the east of the character, the distance would depend on the vertical/horizontal distance values.