Upvote Upvoted 1 Downvote Downvoted
Custom HUD Marked for death won't show
posted in Customization
1
#1
0 Frags +

At the moment I'm making a HUD from scratch and I've come into a problem where the marked for death or bleed icon won't show up. The console kicks out the error:

KeyValues Error: RecursiveLoadFromBuffer: got NULL key in file resource/UI/HudPlayerHealth.res
resource/UI/HudPlayerHealth.res, PlayerStatusBleedImage,
KeyValues Error: RecursiveLoadFromBuffer: got EOF instead of keyname in file resource/UI/HudPlayerHealth.res
resource/UI/HudPlayerHealth.res, (*PlayerStatusBleedImage*),

But I don't have any idea what that wants me to do :/

Also I am able to get the marked for death icon to show if I take out hudplayerhealth.res, open tf2 and then load it back in, but it refuses to move from the default position and restarting tf2 just creats the problem of it not showing again.

Heres all my files:

hudplayerhealth.res - http://pastebin.com/tkn1izek
Whole HUD - https://github.com/PlankPlankington/PlankBoard

Thanks bby x

At the moment I'm making a HUD from scratch and I've come into a problem where the marked for death or bleed icon won't show up. The console kicks out the error:

KeyValues Error: RecursiveLoadFromBuffer: got NULL key in file resource/UI/HudPlayerHealth.res
resource/UI/HudPlayerHealth.res, PlayerStatusBleedImage,
KeyValues Error: RecursiveLoadFromBuffer: got EOF instead of keyname in file resource/UI/HudPlayerHealth.res
resource/UI/HudPlayerHealth.res, (*PlayerStatusBleedImage*),

But I don't have any idea what that wants me to do :/

Also I am able to get the marked for death icon to show if I take out hudplayerhealth.res, open tf2 and then load it back in, but it refuses to move from the default position and restarting tf2 just creats the problem of it not showing again.

Heres all my files:

hudplayerhealth.res - http://pastebin.com/tkn1izek
Whole HUD - https://github.com/PlankPlankington/PlankBoard

Thanks bby x
2
#2
1 Frags +

Some hud elements are difficult to move including the PlayerStatus* elements and the vaccinator ResistIcon

For these elements you need to add an anchor and position it one place and bind all elements to that anchor.
For example:-

"Resource/UI/HudPlayerHealth.res"
...
"PlayerStatusAnchor"
{
	"ControlName"				"EditablePanel"
	"fieldName"				"PlayerStatusAnchor"
	"xpos"					"5"
	"ypos"					"64"
	"wide"					"30"
	"tall"					"30"
	"visible"				"1"
	"enabled"				"1"
}
"PlayerStatusBleedImage"
{
	"ControlName"				"ImagePanel"
	"fieldName"				"PlayerStatusBleedImage"
	"xpos"					"0"
	"ypos"					"0"
	"zpos"					"7"
	"wide"					"30"
	"tall"					"30"
	"visible"				"1"
	"enabled"				"1"
	"scaleImage"				"1"	
	"image"					"../vgui/bleed_drop"
	"fgcolor"				"TanDark"
	"pin_to_sibling"			"PlayerStatusAnchor"
	"pin_corner_to_sibling"			"1"
	"pin_to_sibling_corner"			"1"
}
...

note that PlayerStatusBleedImage now has `"ping_to_sibling" "PlayerStatusAnchor"`

Have a look at broselhud_blue's HudPlayerHealth if you still don't get it
https://github.com/fblue/broeselhud_blue/blob/master/resource/ui/hudplayerhealth.res

Hope that makes sense.
Good luck in editing your hud!

Some hud elements are difficult to move including the PlayerStatus* elements and the vaccinator ResistIcon

For these elements you need to add an anchor and position it one place and bind all elements to that anchor.
For example:-

[code]
"Resource/UI/HudPlayerHealth.res"
...
"PlayerStatusAnchor"
{
"ControlName" "EditablePanel"
"fieldName" "PlayerStatusAnchor"
"xpos" "5"
"ypos" "64"
"wide" "30"
"tall" "30"
"visible" "1"
"enabled" "1"
}
"PlayerStatusBleedImage"
{
"ControlName" "ImagePanel"
"fieldName" "PlayerStatusBleedImage"
"xpos" "0"
"ypos" "0"
"zpos" "7"
"wide" "30"
"tall" "30"
"visible" "1"
"enabled" "1"
"scaleImage" "1"
"image" "../vgui/bleed_drop"
"fgcolor" "TanDark"
"pin_to_sibling" "PlayerStatusAnchor"
"pin_corner_to_sibling" "1"
"pin_to_sibling_corner" "1"
}
...
[/code]
note that PlayerStatusBleedImage now has `"ping_to_sibling" "PlayerStatusAnchor"`

Have a look at broselhud_blue's HudPlayerHealth if you still don't get it
https://github.com/fblue/broeselhud_blue/blob/master/resource/ui/hudplayerhealth.res

Hope that makes sense.
Good luck in editing your hud!
3
#3
0 Frags +

Thanks so much, hadn't even considered creating a new panel to bind it to! This cleared it all up :)

Thanks so much, hadn't even considered creating a new panel to bind it to! This cleared it all up :)
Please sign in through STEAM to post a comment.