edited December 2022 in General Support
Hi! First of all, I am sorry for my poor English. I am using the translation tool to describe my problem.I am a new developer and have found this very useful tool. Thank you very much for your support.

Currently, I'm setting up UI modules in my game using assets purchased from the Unity Store. When setting up the Player's HP HUD, the HP image doesn't have a sprite, but it does have a material that changes the filling using Slider Component.

I looked up the documentation and tutorials, and it seems that the default Status Value HUDs can only control the change of the value through Filled image type on the Image components, Is there a way to display a change in a Combatant's health value using the Slider Component?

I don't know if I have described it clearly, here is the inspector interface of the image:

https://imgur.com/a/PQLR4Ht
Post edited by Xiaofan on
  • Sliders for value bar display are currently not supported - I'll look into adding a new component for that.

    For now you could write your own custom component. Check out the HUDSpriteValueBarComponent in Makinom's source code (UnityUI project) for an example.
    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 December 2022
    Ok, I will try. Thanks!
    Post edited by Xiaofan on
  • Next update (probably sometime end of January) will add a new component for sliders used to display value bars.
    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!
  • Hey, it's me again! Thank you for your support!

    Now I have a new problem about the battle system.

    The game is a turn-based/phase game where the player walks on a 6*6 grid map. Every turn he moves, the grid cells refreshes items or enemies, and the player collects、attacks and so on. In this manner, it continues until the player dies or the victory condition is reached.

    1. At the beginning, I used the tutorial similar to match3 game, where I first "Created Grid" and then used "Fill Grid Cells" to generate player,items or enemies randomly according to the turn. However, when generating enemies, I tried many methods but couldn't make player and enemies enter the battle state, so I couldn't switch turns normally. Of course, the"Calculate Action" node is invalid, because it must be started by a battle action;

    2. Then I switched to "Battle Grid" and "Battle" components to try it out, and configured them according to the tutorial, but there was also some problems:

    2.1. When I place or spawn the player, there must be an enemy on the map before I can enter the battle. On the contrary, if I place the player first and then use "Join Battle" or "Spawn Battle Combatants", the player still cannot enter the battle;

    2.2. I temporarily solved the problem of 2.1 by making the player an enemy. Now the player can enter the battle and the turn can be switched normally, but after destroying all enemies on the map with the skill, if no enemies are generated in the next turn, the player is out of the battle again. Then the next time an enemy spawns, it's back to the old problem of not being able to enter the battle.

    These problems has been bothering me for a long time, whether I'm using Battle Spots, or using distance to determine if the player and enemy are entering a battle. Was there anything I missed or misunderstood about the Battle Settings?
  • 1) Makinom's grid feature (e.g. in Match 3 tutorial) and ORK's battle grid are separate things, so if it's only for spawning/moving on a grid and not grid combat (e.g. with grid shape use ranges), that can be fitting for your need instead of a battle grid.
    Makinom's grid is just a helper for spawning/moving things on a grid.

    Spawning a combatant into a Makinom grid cell might be a bit tricky, but you could just use the grid for their positions and spawn things based on those grid object positions.
    The rest, collecting, starting battle, etc. can be done via schematics, e.g. Start Item Collector node for item collectors or Start Battle node to start a battle with a game obejct (via their combatant or Battle component).

    2.1) A battle can only start if their is a player and an enemy to start it.

    2.2) The battle ends when one side was defeated (i.e. all dead or removed from battle). So you'd have to start a new battle, e.g. via the Start Battle node I mentioned above. Or, a still ongoing battle can have new combatants join in - Battles > Battle System > General Settings has the Auto Join Settings to manage if combatants can join in on a battle based on distance to 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!
Sign In or Register to comment.