ID:1042369
 
(See the best response by NNAAAAHH.)
Code:
for(var/mob/Players in oview(10))


Problem description:
How can you control all the players that are not in oview() ?


range() and orange() should do the trick.
So you mean to say that you want to control everyone that isn't in oview()? Just do for(var/mob/m) - that grabs a list of every mob in the world. The same concept applies to grabbing players - for(var/client/c).
Yea but i want to make a list of every monsters that are not in players oview() to walk back to their initial loc.
In response to Phat T
Best response
That could be very troublesome with a lot of mobs, it's best to make indivisual AIs for the monsters and then you could make a variable for if it's found an mob, how far that mob is, and if the mob is in view. With this, you can allow them to walk a certain distance before the mob stops chasing them.

mob/monster
var/mob/Player
var/turf/spawn
New()
..()
spawn=loc
AI()
proc/AI()
while(src)
if(Player)
if(get_dist(src,Player)<10)//if player within 10 steps
step_to(src,Player)//step the monster in the direction of the player
sleep(10)
continue//continue the while loop, ignoring everything below to ensure it only chases the trageted mob.
else //If the player is not within this range
Player=null//reset the Player variable
else//if currently no player is within 10 tiles of the monster's view
step_to(src,spawn)//walk the mob back to the spawn through each 1 second loop, checking for mobs on it's way back.
for(var/mob/m in oview(10,src))//search for mobs within ten tiles of the monster
Player=m//set the found mob as the target
break//break the for() loop
sleep(10)//wait one second


Probably sloppy, but you should get the jest of it. I'm rather tired currently. Others are free to correct and shame me on this post, they would anyway. D: (lol)
Ty man that was helpfull