ID:167933
 
I want to add something to the statpanel, but I only want it visible at certain times. How do I do this? (hidden = 1 doesnt work)
Just only call statpanel() or stat() when that condition is true.

mob/Stat()
if(panel_viewable && statpanel("The Panel"))
stat("blah")


~~> Unknown Person
In response to Unknown Person
Only problem is that I actually want it always working. Like, I want the stat auto-updating even when its not shown in the statpanel (because its on your screen). With that if, it won't auto update will it?
In response to Polantaris
Bump
In response to Polantaris
If you wanted that, then you just do the check after you call statpanel()

mob/Stat()
if(statpanel("Thing")) // if you are viewing it. don't load what you're not looking at
stat("Bleh")
if(viewable)
stat("Blah")


~~> Unknown Person
In response to Polantaris
Yes, it will update, if you put the 'updating' section of your code in the right place.

Stat()
count++
if(showcount)
statpanel("Count!")
stat(count)