Hi,

In my shop scene
1) my currency hud is showing but not updating
i have a HUD in my scene hierarchy with a HUD Text Content component on.
But the HUD only updates when entering the scene. While buying/selling items in the scene, the HUD doesn't update.

hudtextcontent

(Also, i've tried to follow this tuto but the HUD doesn't show : http://orkframework.com/guide/tutorials/ui-setups/unity-ui-currency-hud/ )

In Battle
2) i want a HUD to show only when the enemy is taking damage, but comparing HP Current value and Display value doesn't work.

htrheyrtehyt
  • 1) Using the global currency text code like that in a HUD will not be updated and just show the amount it had when the HUD was last updated (e.g. when it's shown).

    Instead, use the currency HUD as you linked above - why it's not showing depends on your setup. Generally, the HUD Combatant Item component that's used to get the currency requires a combatant provided to it by it's own content provider, e.g. by having the HUD be used as a Combatant HUD.
    Alternatively, you can also use the HUD Player Combatant content provider component.

    2) I'll test this, never used it that way :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • 2) Yep, that's a bug - seems like the combatant condition here is only checked once when the status changed and not again.
    Will be fixed in the next update.
    Also, a Not Equal check is the way to go if you want to display on any changes (while counting to the new value).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • 1) I checked again and i think all my settings are as said in the tuto.
    i've tried with a HUD Player Combatant component without success.
    frezgerzgterg

    2) Not Equal ! indeed, did not think of it thanks
  • 1) The HUD Combatant Item still uses the HUD component as content provider, you need to select the HUD Player Combatant component here :)
    How's the HUD generally shown - are you using it as a HUD set up in the editor?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • 1) Aww ok ! It's showing and working fine now, thanks GiL !
    Putting the HUD Prefab directly into the scene works.
    Set up in the editor doesn't, even with no display conditions.
    gregythuytjuy
  • edited February 2022
    Well, naturally - you need to enable Player to show it for the player :)

    The Only Leaders option will only display the HUD for the leader of a group, but you still need to enable player, ally or enemy to display it for someone. And since this is for a shop, you'll probably need the player.
    With Only Leaders disabled, it'd show the HUD for each member of a group.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited February 2022
    Hmmm idk i've tried with Player enabled (and other settings as well) but still, nothing shows.
    Or perhaps i have to have my mouse cursor above a combatant with a special component ?
    Post edited by kiwi on
  • Hm, no ... are you using any display conditions in the HUD setup?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited February 2022
    But there is a player, right?
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited February 2022
    image

    since i don't need one i never checked <_< well, it works now :p
    thanks GiL
    Post edited by kiwi on
  • How can you not need a player :D
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I don't really know if i have none but i haven't assigned a prefab to it.
    In my game, the player move like in a Visual Novel (from scene to scene with arrows HUD).
    Since battling worked without me having to touch at the player settings i just never bothered with it.
    But perhaps i will have to, i'm not sure i'm still discovering ORK ^^
  • Well, yeah - you need a combatant in your player group or a Combatant HUD has no combatant to display for (when displayed for players). Also, the Combatant Object HUD naturally needs a spawned combatant on-screen to be visible, since that HUD is displayed at a combatant's game object position.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Got it,
    thanks GiL.
Sign In or Register to comment.