0
Answered

update Stats not updating Attribute UI

Alienmadness 3 weeks ago in Stats updated by Marti (Lead Developer) 1 week ago 7

i just updated the stats to the newest version.  after doing so, i had to go through and fix a few things.. 

i have an HP UI and when the stats value HP goes down, i can see the change in the player component, but the Attribute UI is not updating.

here is example of the UI component

Here is an example of the Stats component (in process)

Unity version:
unity 2019.3
Game Creator version:
1.0.4

Answer

Answer
Answered

Aha! Sorry I didn't see this in the first message you posted. In the Attribute UI component, you have the Smooth Transition Up and Smooth Transition down properties set to true. This means that Game Creator will try to progressively move the health bar from its current value to the next.

However, you have also a Transition Delay of 0.2. This means that the bar won't change until there's a window of 0.2 seconds where the attribute hasn't changed its values.

You can set the Transition Delay to 0.0 or uncheck the Smooth Transition Up/Down properties and it should work fine.

GOOD, I'M SATISFIED

that worked, thanks

Satisfaction mark by Alienmadness 4 days ago
Under review

Hi Alienmadness. The Attribute UI component not updating at the beginning should be fixed in the latest version. Before digging further, sometimes, when updating a module from the Asset Store, it is forgotten to open the Module Manager and click on "Update".

Might this be the issue? If not, we'll investigate what could be happening

yes, its updated there ... shows v 1.1.1

I just checked this and it seems to be working fine. I notice you're using Unity 2019.3, which is a Beta version of Unity. Could you try 2018.4 LTS, which is the long-term stable and officially supported one? Also, make sure the Stats component is actually on the Player and not nested as a child, and that the references are correctly set up.

yes, the stats component is on the player..

i noticed the UI does in fact update, but its delayed.  seems to only update after the status effect is completed.

I basically have a poison trigger, which lasts 4 seconds.  the UI doesn't update as the health goes down.  Once the poison status effect stops, the Attribute UI (the healthbar) updates and reflects the correct health.  

i hadnt noticed this before, since the player died before the health bar updated.  i decreased the timer on the Status effect and was able to see it update....

Are you sure you are decrementing the health of the Player in the "While Active" actions list and not at the On Complete? Can you attach here some screenshots of your poison status effect?


The example scenes that come with the Stats module show how to create a Poison status effect (inflicted by a green ball that follows the player around). In case you want to check that out first: https://docs.gamecreator.io/stats/stats/common-use-cases/poison-status-effect

ya here is the screenshot.  i think its setup.  i've followed the docs... before i posted here.

as i mentioned, this worked fine prior to the last stats update.


thanks for your time....

Answer
Answered

Aha! Sorry I didn't see this in the first message you posted. In the Attribute UI component, you have the Smooth Transition Up and Smooth Transition down properties set to true. This means that Game Creator will try to progressively move the health bar from its current value to the next.

However, you have also a Transition Delay of 0.2. This means that the bar won't change until there's a window of 0.2 seconds where the attribute hasn't changed its values.

You can set the Transition Delay to 0.0 or uncheck the Smooth Transition Up/Down properties and it should work fine.