ID:139706
 
Code:
obj
SkillTree
screen_loc = "1,1"
icon_state = "SkillTree"
mouse_drop_zone=0
Click()
if(usr.Skill_Tree)
for(var/I in usr.client.images)
if(I)
del I
usr.client.view=6
usr.client.eye = usr
usr.SkillTree = 0
usr.AddHUD1()
usr.AddHUD2()
usr.client.view = 12
usr.HUDRemove()
usr<<output("Your view has changed, but you are still in the same spot.","Out")
usr.SkillTree = 1
usr.client.eye = locate (13,13,2)
usr.UpdateSkillTree()


Problem description:

Hi Guys! Here's a HUD button that sends a person to the skill tree map. This was working fine before, when the skill tree was only 13x13, which fit my view of 6 perfectly. But now I've increased the size of the skill tree to 25x25. Now, when I click the skill tree verb, I wanted it to also change the person's view to 12 to accomodate the larger skill tree. Unfortunately, the game does not want to make the view larger. Does anybody know why my view won't increase when I use the verb?
when you change usr.client.eye, I'm pretty sure it adopts the view of whatever atom it's connected to, or it reverts to default if its a location. Try removing the usr.client.eye change (use // to temporarily disable it by making it a comment) and see how that works. If the view stays as 12, but the page is off center then try changing the view to usr.client.view="13x13"

Honestly I'm not sure of the exact problem, but try experimenting with the client.eye, because I'm pretty sure that's where the problem lies.