ID:138381
 
I'm having a bit of a problem with the client.eye
What I'm trying to do is to move a client mob into the contents of an object - the idea being that the object moves and takes the mob with it. I'm making the move with something like usr.loc = O.contents This is my problem - as soon as I make the move the map screen goes black for the mob. I've tried resetting the client.eye to the container object, but the code has no visible effect. Is there a way that I can display the map screen as if the obj were the client? (note, the obj may contain several mobs who I would like to be fully functional during transit). Ideas?
(note, the obj may contain several mobs who I would like to be fully functional during transit). Ideas?

This is a problem I've had before too. The reason for it is that client.eye still shows you everything from the viewpoint of your mob. So if you set client.eye 100 turfs away, you'll only see things if you have an unobstructed view for 100 turfs. Likewise, if you put the mob in an object, the mob can't see any turfs around it, so even when you set client.eye to the object you get a black map.

One workaround could be this:

Give the object a passengers list.
When people become passengers, their icons temporarily are set to null. (You could set visibility instead, but then each player would still see its own mob.)
Override the object's Move proc to drag along everything in the passengers list whenever it moves.

Good luck!