Restless Souls/Wishlist: Difference between revisions

m
→‎HUD: let's build an health bar animation ... yay ... errr ... the long way
m (→‎HUD: let's build an health bar animation ... yay ... errr ... the long way)
Line 506: Line 506:
To deal with the transparent areas it might be the easiest to add another object to the health bar. In total we have then three: a frame texture, a "future/past health" material, and a "present health" material.
To deal with the transparent areas it might be the easiest to add another object to the health bar. In total we have then three: a frame texture, a "future/past health" material, and a "present health" material.


[...]
How to increase values over time? It looks like "timeline" don't have inputs for start and end time and timers don't work in character BP. Even loops are problematic: if they contain a delay node it is simply ignored. The solution seems to be a custom event. Once triggered it will increase or decrease the health value and call itself again if the certain conditions are still true. The animation seem smooth enough with a 0.1 second delay.




8,018

edits