ID:173981
 
Ok well I just wanted to know how to set the client eye to view random mobs when I tried it just gave me a black screen so iam stuck.
client.eye is a turf so you need to set it to the loc of the mob.
In response to Maz
Maz wrote:
client.eye is a turf so you need to set it to the loc of the mob.

If I am not mistaken, client.eye can be set to a turf, mob or obj. The only one of those that I am not sure about is the obj, but I am sure that it can be a turf. If you set it to a mob, it will follow that mob around and fixes the center of your view to the current turf at your coordinate, but client.eye itself remains equal to the mob.

I have done some nifty stuff before with client.eye, such as planting an obj onto someone else's mob that lets you view through that mob. Switching client.eye to that mob, you get to watch everything it does. :)
client/proc/random_view()
var/list/players=list()
for(var/mob/M in world)
if(M.client)
players.Add(M)
eye=pick(players)
Darkfirewolf5 wrote:
Ok well I just wanted to know how to set the client eye to view random mobs when I tried it just gave me a black screen so iam stuck.

The problem is perspective. Change client.perspective to EYE_PERSPECTIVE (either as a default or when you change client.eye) and you'll be able to see things outside your mob's field of view.

Lummox JR
In response to Maz
client.eye can be set to any atom. And it's actually set to your mob by default! =) It will work on mobs, objs, turfs, and areas; it's just usually not particularly useful to set it to areas.