ID:271838
 
How can i make an object that, once clicked, scans all mobs in the players oview? In a way that scans all mobs in the area then breaks the proc?
proc
Scan(mob/m as mob, var/distance=5)//DOES NOT SCAN M, SCANS M's OVIEW
var/list/l=new
for(var/mob/mm in oview(distance,m))
l+=mm
return l


This code snippet scans through all of the mobs in m's oview of the distance argument. It returns a list of all the mobs it found.
In response to FIREking
can you make that work in a Click proc of an obj
In response to Lt. Pain
//... including code of last post

obj
thing
Click()
for(var/m in Scan(usr))
world << m


shows each player's icon and name in the result of scan for whoever clicked the object
In response to FIREking
The whole Scan() proc is just a silly, roundabout, less robust version of the oview() proc.
In response to Garthor
yeah...

but his question is silly, so i gave him a silly answer