I am new to using byond code, and have found that several issues that I can't find answers for.
1. Is it possible to cause a player to spawn upon logging in as something other than than just mob, such as mob/observer or mob/ghost?
2. After the player has spawned how do I move the player from one mob to another?
3. What is the correct way for using the new function? I always try to go var/mob/ghost/G = new(src), but when I do this I get an error about an undefined variable.
Aug 6 2012, 12:04 pm
|
|
You mean changin character
|
1. Indeed. Set world.mob to the typepath of the mob you want, like...
world 2. The client has a variable that holds what mob it's attached to. It's as simple as simply setting client.mob to equal a different mob. 3. It looks like you're doing it right. Are you sure the error is "undefined variable" and not "variable defined but not used"? |