ID:2213162
 
(See the best response by Kayren.)
I'm trying to make a skin Bar reflect my health ingame but it deletes any symbol or command I put in (IE. "[src.health]/[src.maxhealth]" becomes "srchealthsrcmaxhealth"). I've tried everything I could think of and have asked friends for help but nothings has worked. Any of you got any ideas?
It would help if you actually included an example of the code. We can't help you if we don't know what you're doing.
Best response
An excerpt from one of my old messing around with skins that worked, maybe that will help:
mob/player/proc/Refresh_Charwindow()
var/tmp/life_barvalue
life_barvalue = char_life / char_maxlife * 100
winset(src,"stats.bar_life", "value=[life_barvalue]")


Basically, first I calculate and then I use another var to set the bar's value. I believe that I also had the problem with the symbols being deleted so that's how I circumvented it.

In case you want to add some text that states your lifepoints and stuff, I'd say add a label underneath or above it that you change with another winset.
Nah bruh I need to know what you're doing right now. Ain't nobody gonna steal your precious codes, pinkie swear. Can't nobody help you if they don't know what you're doing in the first place.
Well I dont have the codes myself. Im editting the skin of a game I play, and wanted to add hp/chakra bars for myself. I didnt assume it would require changes in the code itself.
Of course it would require changes to the code, interface elements mean nothing without code interacting with them.