ID:261930
 
Does anyone know how to add and remove statpanels?

~Officer Falcon
Okay, I'm assuming you know how to make statpanels already. Example:

<code>mob/Stat() statpanel("Some stats") stat("HP", src.hp) statpanel("Some more stats") stat("Cash", src.money)</code>

All you have to do is make a mob var that controls whether the statpanel is shown. If it's set to false, don't execute the commands that display that statpanel.

<code>mob var/displayhp=1 var/displaymoney=1 mob/Stat() if (displayhp) statpanel("Some stats") stat("HP", src.hp) if (displaymoney) statpanel("Some more stats") stat("Cash", src.money) mob/verb/toggle_hp() displayhp=!displayhp mob/verb/toggle_cash() displaymoney=!displaymoney</code>

You can alter that to suit what stats you actually want to toggle.
Everything you ever wanted to know about stat panels:
http://www.byondscape.com/ascape.dmb/Shadowdarke.2003-0322/

including the answer to your question (which crispy covered well :) )
http://www.byondscape.com/ascape.dmb/ Shadowdarke.2003-0322/#sttoff
In response to Crispy
Thanx for helping!