#Is it possible to update the labels?

1 messages · Page 1 of 1 (latest)

bronze spruce
#

I want that when I mount an entity, for example, a horse, a tag appears with a number indicating its health. For example, if the horse has 10 hearts, the tag should show 20, and if it takes damage, the tag should update with its current health.

serene quail
#

this is a basic display

#

you can use it by using the title

#

to send data to the display just include the update string of it defined in code

#

@bronze spruce

bronze spruce
#

I have this on my hud_screen

{
"namespace": "hud",
"hud_actionbar_text": {
"$var_actionbar_text": "$actionbar_text",
"visible": "(($var_actionbar_text - '!') = $var_actionbar_text)"
},
"c_crosshair_image_factory": {
"type": "panel",
"factory": {
"name": "hud_actionbar_text_factory",
"control_ids": {
"hud_actionbar_text": "c_crosshair@og_custom_crosshair.og_hud"
}
}
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{
"[email protected]_crosshair_image_factory": {}
},
{
"[email protected]_hp_label": {}
}
]
}
]
}
}

serene quail
#

then add the stuff

#

for the root panel you need to add this in the value array