StrikerTheHedgefox Posted December 7, 2021 Share Posted December 7, 2021 (edited) I have a HUD that shows things like current level, times died, and number of zombies killed, but since A20, it broke, and it's complaining that the PlayerStatsWindow controller is missing/unknown. <rect pos="-85,-3" width="75" height="75" controller="PlayerStatsWindow" visible="{statvisible}"> <sprite depth="1" width="75" height="75" name="border" color="222,255,163,55" type="sliced"/> <filledsprite depth="5" width="71" height="71" pos="2,-2" name="background" color="0,0,0,290" type="filled" fill="1" /> <sprite depth="6" name="TodeIcon" width="65" height="65" pos="3,-5" sprite="ui_game_symbol_zombie" color="96,96,96,100" foregroundlayer="true"/> <label depth="10" name="ZombiekillsLabel" width="75" height="37" text="{playerzombiekills}" font_size="24" color="[ora]" pos="37,-35" justify="center" pivot="center"/> </rect> <rect pos="763,-3" width="75" height="75" controller="PlayerStatsWindow" visible="{statvisible}"> <sprite depth="1" width="75" height="75" name="border" color="222,255,163,55" type="sliced"/> <filledsprite depth="5" width="71" height="71" pos="2,-2" name="background" color="0,0,0,290" type="filled" fill="1" /> <sprite depth="6" name="TodeIcon" width="65" height="65" pos="3,-5" sprite="ui_game_symbol_near_death_trauma" color="96,96,96,100" foregroundlayer="true"/> <label depth="10" name="TodeLabel" width="75" height="37" text="{playerdeaths}" font_size="24" color="[ora]" pos="37,-35" justify="center" pivot="center"/> </rect> How am I supposed to fix this? Is there a replacement controller? Edited December 7, 2021 by StrikerTheHedgefox (see edit history) 2 Link to comment Share on other sites More sharing options...
ThePewter Posted December 8, 2021 Share Posted December 8, 2021 I made a little progress this morning trying to update the UI mod we use... The original XML was <rect pos="-75,37" width="75" height="75" controller="HUDStatBar" stat_type="Food" visible="{statvisible}"> ... snip ... <label depth="7" name="TextContent" pos="4,-1" font_size="26" color="[white]" text="{playerfood}" height="34" width="45" justify="left" controller="PlayerStatsWindow" /> I changed the last line to... <label depth="7" name="TextContent" pos="4,-1" font_size="26" color="[white]" text="{statcurrent}" height="34" width="45" justify="left" /> It seems to be working for stat_type of "Food" and "Water". I've got a bit more work/testing to do but I thought I'd post a quick update. 1 Link to comment Share on other sites More sharing options...
Scomar Posted December 11, 2021 Share Posted December 11, 2021 yeah, that's a big problem. I tried to solve it, but i only get a value, but this value don't refresh in the hud, it only refreshs by joining the game. -.- Link to comment Share on other sites More sharing options...
Shino Posted December 11, 2021 Share Posted December 11, 2021 Maybe it changed names? Have you checked the vanilla xUI.xml to see if it didn't? I'm having the same problem (and a few more) when trying to update Sirillion's Z2 to a20 for personal use. Link to comment Share on other sites More sharing options...
StrikerTheHedgefox Posted December 21, 2021 Author Share Posted December 21, 2021 Just a follow-up: A friend told me you can get level by doing {cvar($LastPlayerLevel)} Link to comment Share on other sites More sharing options...
Scomar Posted December 22, 2021 Share Posted December 22, 2021 16 hours ago, StrikerTheHedgefox said: Just a follow-up: A friend told me you can get level by doing {cvar($LastPlayerLevel)} nice, thanks for the Info Link to comment Share on other sites More sharing options...
StrikerTheHedgefox Posted December 23, 2021 Author Share Posted December 23, 2021 Forgot to add, the controller needs to be "ToolbeltWindow" for that to work. Link to comment Share on other sites More sharing options...
blitwarm4st3r Posted October 14, 2022 Share Posted October 14, 2022 Sorry for the necro. Were you able to make playerzombiekills and playerdeaths work without PlayerStatsWindow? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now