Health Pickup

After doing this episode i’m getting errors that my health pickup is not working anymore.
I was getting nullreference errors, so I tried to fix it.
I now have a new health potion scriptable object (action item) that I can pickup. From my inventory I can put it on my action bar aswell.
However, how do I make it so that I can actually use the health potion from my action bar? Should this already be working and am I missing something or how do i fix this?

We actually forgot to add the code into the PlayerController for activating the ActionBar items with a character.
In the Update(), check to see if the 1 is pressed, if so, GetComponent<ActionStore>().Use(0, gameObject); The gameObject is needed for context so that the item knows who called it.
Rinse and repeat for the remaining 5 bars.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms