ID:160638
 
Well, I'm trying to add a spectate verb for the game I host but it won't change my view. It compiles and all but nothing occurs. This is what I have.

            Spectate(mob/M in world)
set category = "GM"
switch(alert(usr,"Do you really want to spectate [M]","Spectate?","Yes","No"))
if("Yes")
usr.eye=M.eye
return
if("No")
return
Spectate_Off()
set category = "GM"
switch(alert(usr,"Stop Spectating?","Stop?","Yes","No"))
if("Yes")
usr.eye=usr.loc
return
if("No")
return


Should I change eye to perspective?
            Spectate(mob/M in world)
set category = "GM"
switch(alert(usr,"Do you really want to spectate [M]","Spectate?","Yes","No"))
if("Yes")
usr.eye=M.eye
usr.client.perspective = EYE_PERSPECTIVE
return
if("No")
return
Spectate_Off()
set category = "GM"
switch(alert(usr,"Stop Spectating?","Stop?","Yes","No"))
if("Yes")
usr.eye=usr.loc
usr.client.perspective = MOB_PERSPECTIVE
return
if("No")
return
In response to Theactivenet (#1)
When I do that I come up with undefined var.
In response to THESINKING (#2)
Here
mob/verb
Spectate(mob/M in world)
set category = "GM"
switch(alert(usr,"Do you really want to spectate [M]","Spectate?","Yes","No"))
if("Yes")
usr.client.eye=M.client.eye
usr.client.perspective = EYE_PERSPECTIVE
if("No")
return
Spectate_Off()
set category = "GM"
switch(alert(usr,"Stop Spectating?","Stop?","Yes","No"))
if("Yes")
usr.client.eye=usr
usr.client.perspective = MOB_PERSPECTIVE
if("No")
return
In response to Theactivenet (#3)
Thank you so much it worked :D
In response to THESINKING (#4)
np