Anyway, I was thinking about the ways of refreshing something, like a HUD (which is in fact what I want to refresh). There are two simple ways to do this: make it refresh in Stat(), or manually call the refresh proc whenever I change a variable. The former way works, but causes unnecessary lag, and the latter way is annoying because you have to call that proc every single time.
I was wondering if it would be possible to make it check in Stat() whether or not a variable has been changed, and if it has been, it will refresh the HUD. The solution I have right now looks like this:
mob/var/HP = 50
mob/var/hud_HP = 50
mob/Stat()
if(hud_HP != HP)
hud_HP = HP
Refresh()
Of course, that would involve creating two variables for each stat I want to show on my hud, which would be a big pain. Is there an easier way of doing this?