ID:269629
 
I want to constantly change the view of the player and what he controls. I am trying mob = /mob/player1 but it wont work. Could someone please correct me or give me another code which will do this.
I think what you're getting at here is the mob key variable, or the client mob variable. The player's view and control depend on the mob he or she is connected to. To connect a player to a mob, either set that mob's key to the key of the player, or set the player's client's mob variable to that mob. For instance, if I wanted to connect to a mob labeled M, I'd have this line somewhere:
var/mob/player1/M = new(locate(/turf)) // place a new /mob/player1 labelled M on a /turf on the map
var/mob/player2/N = new(locate(/turf)) // place a new /mob/player2 labelled M on a /turf on the map

M.key = "DerDragon" // set the key of the /mob/player1 I just created to "DerDragon", which will disconnect him from any other mob and connect him to this one, or just leave him connected to this one if he's already connected to it


Keep in mind you have to have the mob already created. "mob = /mob/player1" looks like something that belongs under /world, which would set what default mob should be created for clients to connect to in the Login() proc. I'm not sure if this all will help you, play around with the key var a bit and you should probably get it.
In response to DerDragon
Thanks