how do you Simply heal player?

SolitaryBunny

New member
it seems like it should be so simple yet i cannot figure it out. Ive set up my heal item in the UIS, it sort of shows up in my inventory at runtime but then when i click on it the only option i get is 'Cancel'. checked the demos and couldnt find one that explains how the healing items and actually healing the player are linked, one of them creates a cookie healing item and it just works, but going into the demo scene i cant find any component that clearly shows how the potions are linked to the health bar. Checked the documents and came across the “Item View Slots Container Category Item Action Set Binding” and selected the UseItemAction but still doesnt heal or give the consume option in the UI when playing... can anyone give the actual steps on how to actual make a healing item work please.
 
The way Healing a character works is really up to you. There are many different ways to implementing it.
On this page we explain a few different ways on how to use items:

And this page:

In the UIS only demo scene we use a custom itemAction:
1702033569608.png
DemoConsumeItemAction is a custom item action for the demo scene. It gets the heal amount on the item attribute and uses that to heal the character. You can check the source code if you want.

You can see it linked in the UI here via the DemoMainInventoryCategoryItemActionSet object:
1702033549384.png


In the Integration demo scene we do it similarly, but Opsives character controller uses a Character Attribute for health. So we made an ItemAction for modyfying character attributes "CharacterModifyAttributeItemAction":
1702033858268.png
This allows you to have an item action for modifying any kind of character attribute, whether it is health, shield, energy, etc...

Here is how it is linked to the UI of the integration demo scene
1702033789422.png

I hope that helps clear things up.
 
Back
Top