Started by
Octave_
on
Topic category: Troubleshooting, bugs, and solutions
I have a player variable that is set to an NBT value which ticks up when the player damages a mob. When the world is first loaded, the player variable is displayed correctly and ticks upwards when the mob is damaged. However, when the world is reloaded, the player variable is displayed as 0 in the GUI, even though the player variable still ticks up when a mob is damaged (using the /data get command). Additionally, a 'flickering' effect sometimes occurs where the variable will constantly change between 0 and the correct value on the display (in this case the variable still functions normally in the background, it's simply the GUI that is messing up).
Do not use player NBT but player variables. Read more on our wiki on variables page.
Thank you for the reply.
I was using NBT as I can't seem to update player variables within the 'Entity Attacked' global trigger. I understand that NBT has issues with server/client syncing however it was the only method I had found to bypass player variables not updating in that global trigger.