Hi,

I made inventory containers with this tutorial: TUTORIAL

For now, it looks like this:
image

And submenu looks like this:
image

1. Everything works fine beside "Use" button. When I click it - nothing happens, but I set the potion item to add 25 points to my character's health (in my game I called it "Max Health"):
image

So, when player lost his health and try to use the potion - simply nothing happens. The quantity is still the same and health doesn't change.

2. As you can see on the first screenshot, player has 6 potions. But the thing is, I programmed only 3:
image

This is the issue for whole inventory, because when I add one key in start inventory section, my player after spawn got them by two. So, it basically means that my start inventory multiplies somehow by 2 and I don't know where ;/
  • edited March 26
    1) What's your Inventory Container menu part's setup like?
    Especially Animate Use (one of the settings at the top of the menu part) - if it's enabled and the menu screen pauses the game, actually using the item would be delayed until the menu is closed due to the item action being paused as well.

    I also assume Max Health is the Consumable type status value for your health, not the one that defines the max health a combatant can have. Otherwise that'd just increase the possible max health and not regain health :)

    2) Sounds like you either add the player combatant twice or your start schematic where the player is added is running twice.
    E.g. setting the schematic in UI > Start Menu as the start schematic and also using it in your scene (e.g. on the game starter or as an auto machine).
    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!
  • 1. Hmmm, that's strange... You are right: my Max Health isn't set as Consumable, but now I cannot add consumable Health to my player's initial value. I can add only this Max Health, which is set to Normal...

    image
    image
    image

    2. Yes, I had Start Schematic in UI > Start Menu and in ORK Game Starter :D So now everything is fine in the inventory :) Thanks!
  • 1) The consumable status values are set by their max status value, e.g. your setup sets it at 100% of the max health. Your combatant's initial status values (or status development if you use that) define the max health, which in turn sets the consumable health.
    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!
  • Well, no matter how I set this things up, I can lost my health (e.g. walking into a trap that consumes 25 HP and I can see that on HUD), but I cannot regain it by using potion... Quantity also stays the same, unless I drop it from the inventory :D I don't know what can I do for now...
  • Is the potion useable out of battle?
    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!
  • image

    I set "Useable in" to Both, as you can see on the screenshot. Is there any other option to use it outside the battle?
  • What about the this I posted earlier?
    gamingislove said: 1) What's your Inventory Container menu part's setup like?
    Especially Animate Use (one of the settings at the top of the menu part) - if it's enabled and the menu screen pauses the game, actually using the item would be delayed until the menu is closed due to the item action being paused as well.
    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!
  • Animate Use is disabled, Pause Game is disabled as well, but I tried every possible options: unpause/pause, and also check/uncheck Animate Use.

    image

    image
  • edited March 28
    @Sylwester the screenshot in your first post showing the potion, is set to Max Health.

    Max Health is the CAP on health. (normal value)

    Health (consumable) is the actual health value that would be healed/damaged.

    So setting the potion to Max Health is like increasing character maximum HP.

    That is assuming the status values themselves are set up accordingly, to what it looks like.

    Hope that helps
    Post edited by GeneralK on
  • @GeneralK - yes, but I tried set it both to Max Health and Health itself. The result stays the same: potion doesn't work and doesn't lose quantity either. That's the thing - it looks like it doesn't work at all, my character cannot drink any potion :D
  • edited March 29
    Do you get any error in the Unity console?
    The use of an item in a menu screen would usually open a combatant selection to select the group member to use the item on, unless that's specifically set up to not be that way (which it doesn't seem to be based on your screenshots). Might be that you didn't set up the combatant selection (most likely no UI box selected) and that should show an error or warning in the console about that.
    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!
  • I don't have any errors in Unity console.

    Also, I set the "Use" option like this:

    image

    There is something called "Use Combatant Part", but it doesn't change anything.
  • Do you have the combatant selection set up in UI > Combatant Selections?
    The combatant selections set up as default in the Geneal Settings should have a UI box selected in their setups.
    The Use Combatant Part option would only be used if there is a Combatant menu part in the menu screen that displays the group members - in which case that part would get focus to select the target for the item.
    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!
  • Yes, that was it :) I have set up Combatant Selections and now it works perfectly :) Thank you very much for help!
Sign In or Register to comment.