Hello GiL,

I'm trying to display various tutorial pop-ups with different icons due to mouse cursors and so on. In general it's a lot of sprites and in ORK 2, I could create an item with a sprite in it and then call it in the HUD text as #item.iconX# and even change it's shapes.

I'm struggling with displaying in the HUD text+icon content even though I have it all setup. It appears I have to only do it through Sprite Atlas and call specific Indexes through text mesh pro?
  • edited August 2022
    For TextMesh Pro sprites can do a quick test without an atlas like so:

    Right-click a sprite > Create > TextMeshPro > Sprite Asset, then put the new TMP_Sprite Asset in Resources/Sprite Assets folder. Then in ORK, you can temporarily assign your original sprite (not the new TMP_Sprite) anywhere and click "Find TMP Tag" to get the Icon Text Code, which you can now copy/paste in text fields and it should display your sprite.

    The Image component of HUD text+icon is different though. That is for displaying regular, non-TMP sprites that you place in Icon fields such as in Status > Abilities > Icon.
    Post edited by Scyra on
  • Amazing guide mate, works well, thanks a lot! :)
  • Additional question would be, how do you update HUD content every X seconds?

    E.g. I want to update a lot of currencies (without spawning player) as I have crafting game.
    Just a simple UI at the top of the screen.

    Now I see the option only in Menu screens but only information that you put directly in them which is not what I want.
  • edited August 2022
    There is another setting in UI > UI Settings, and scroll down to ORK UI Settings > HUD Settings. HUD Effect Time and HUD Check Time are there...but I'm not sure if it will do what you want because I haven't touched it.

    You might want to look at the last part of this tutorial, right before the Save Changes section (Information Page 0). Using text codes to add the currency to the menu seems like a good way to do it.
    Post edited by Scyra on
  • I'd recommend using specialized HUD components for that, as they automatically update on changes. E.g. check out the Currency HUD tutorial.
    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 August 2022
    @Scyra - Menu screen works, had to use some custom scripting to have UI display conditions though. Thanks.

    @gamingislove The HUD Combatant Item part gets disabled when no combatant is found. It should be visible and defaulting Player currency since I'm using group inventory. Also you can't control the update time on the combatant HUDs. Would be great to have attachable script which sets the desired HUD with info into 'updatable' state and you could just control it the way as information menu screens.
    Post edited by Machal on
  • Well, yeah - it needs to be used in a combatant HUD to have a combatant to get the item/currency/etc. from.

    Alternatively, you can e.g. use a HUD Player Combatant Content Provider component to always use the player as the combatant. That content provider needs to be used by the HUD Combatant Item component to get the item from the player.
    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 know how it works, I'm pointing out that it isn't intuitive and it shouldn't restrict the system for the actual combatant to be spawned. You're just limiting the potential of the tool for no reason. :)
  • Next update will add an option to automatically update the content of the HUD text components every X seconds. It's currently already available, but only if the text contains a time text code (e.g. for game time display).
    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 August 2022
    Why only text components? What about the HUD Value Bar Content? I haven't been able to figure out how to make a smooth change fill amount all day because the bar can only be updated each time the value is changed. Very complicated.

    I'm adding value of 10 every second to a 100 value bar with a 1s wait node. It gets just updated with full values, no smooth transition.

    I'm using 'Count to value' option on a status value. In the 'Value Bar Content' of the UI prefab the 'Current Value' is set to 'Display Value'. Tried everything. Even using Display value itself. Ticked 'Real Value Count' on the Status value too. Nothing. It always updated the value by full amounts.

    I'm using simple HUD Value Bar change with sprites set up to the fill amount and then using Object HUD that is set to a child that has Add Combatant component.

    What is the condition to have it count to the value?
    Post edited by Machal on
  • Value bars already automatically update when their displayed value changed - are you using the ORK HUD Value Bar Content components for displaying status values? E.g. check out this tutorial for making a player HUD.

    Anyway, the next update will also add fading options to value bars, so you can fade value changes for any value bar, even without using count to value for stats.
    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 August 2022
    Yes, I've tried that, and it didn't work. I can see it shows full bar and value 0, all the time even when I see it's rising because I'm saving it into variable. Probably because it either doesn't support object HUDs or 'Add Combatant' component attached to a prefab. Or maybe it's only for Menu Screens.

    I have to spawn a 'Tick' machine that gradually updates the value so that the object HUD can 'smooth' it out.

    The gradual value bar update and HUD update option in next update is something this really needs, is there any ETA? :)
    Post edited by Machal on
  • I think your overall HUD setup is wrong.
    The Add Combatant component does nothing for a HUD :)

    HUD content components get their content do display from their content provider components, e.g. their root HUD component, which is set by the HUD setup in the ORK/Makinom editor (e.g. the combatant the HUD is displayed for).

    For providing content for HUDs outside of the HUD system, you can use various content provider components, e.g. HUD Combatant Object content provider component to get a combatant from a defined game object or the HUD Player Combatant content provider component to get the player (or a member of the player group).

    Next update should be available around end of August.
    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!
  • The Add Combatant is the main requirement for most of your HUDs. Without it, it wouldn't be even displayed :)

    I've found out the issue. I used to update the ORK player but also the object itself. While now I was just updating the Player, so wondered why is the HUD not being updated. The combatant object is being used as a sole entity in the world so I need double value updates :)


  • Machal said: The Add Combatant is the main requirement for most of your HUDs.
    No, Add Combatant only adds a combatant to a game object in your scene - it doesn't add that combatant to the HUD to display it's content, unless the HUD is set up as a Combatant type HUD and shows for the added combatant :)
    So, basically like combatant spawners, just the combatant being added to a game object already in your scene :)

    Anyway, regardless of the combatant being the only one in the scene, being the player (or player group member) or any other combatant - if the HUD is displayed for the combatant, you shouldn't need any double value updates or anything like that. The HUD automatically updates based on the displayed content.
    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!
Sign In or Register to comment.