ID:168707
 
How to change the client.statpanel var? I tried
statpanel="Inventory" but it didn't work.
CIB wrote:
How to change the client.statpanel var? I tried
statpanel="Inventory" but it didn't work.
statpanel var? I jdon't think you understand it right, here is an examle of statpanels though:
mob/var
hp = 78
mp = 4

mob/Stat()
statpanel("Inventory")
stat("Items", "")
for(var/obj/o in contents)stat(o)
statpanel("Players")
for(var/mob/m in world)if(m.client)stat(m)
statpanel("Stats")
stat(src)
stat("Hp:", hp)
stat("Mp:", mp)
statpanel("Info")
stat("Story", "")
stat("", "Once upon a time!")
stat("", "Blah!")
stat("Other", "")
stat("", "Why am I under Other?!?!")
stat("", "Live with it!")
mob
Stat()
statpanel("Inventory")
stat("what you want to display here")
statpanel("stuff")
stat("stuff")
stat("can")
stat("go here")
In response to Zaltron
...
client
Southwest()
//and now I want it to change the statpanel
statpanel="Inventory"//but this didn't work

Nevermind, it works with text, I just hit wrong button XD
CIB wrote:
How to change the client.statpanel var? I tried
statpanel="Inventory" but it didn't work.

if I understand, you want to make it so you can switch what statpanel you want to show up.

to do that use vars
ex:
mob/Stat()
if(!src.showstat)
statpanel("Inventory")
stat(contents)
if(src.showstat)
statpanel("Profile")
stat(src)
stat("key",key)
if(src.showstat == 2)
statpanel("PLayers")
for(var/mob/M in world) stat(M)
mob/verb/Change_Stat_Panel()
switch(alert("What Panel?",,"Inventory","Profile","Players"))
if("Inventory")
usr.showstat = 0
if("Profile")
usr.showstat = 1
if("Players")
usr.showstat = 2
mob/var/showstat = 1


This if I understand you correctly.
In response to Crzylme
Yeah this is sort of what I wanted but it is much easier with the client.statpanel var... I figured it out myself anyway :P
In response to CIB
Alrighty then....