How To Create A Collectable Medkit That Restores Your Player’s Health

Adam Reed
2 min readApr 25, 2021

--

Did your player get damaged? Are they struggling to survive and just want a little bit more health to help them overcome that last big obstacle in your level? Well, you’ve come to the right place! Here at “Adam’s Fantastic Medical Emporium Of Totally Not Illegal Supplies!” we offer all the best medical grade recovery items that you can’t tell your mom you took. Now with only half the side effects AND 40% more Kocaine!!!

So the bright side of this is that it’s going to take you less work to implement this feature into your game than it did for “Adam’s Fantastic Medical Emporium Of Totally Not Illegal Supplies!” to come back from that last class action lawsuit.

[NOTE]

Don’t try to sell Kocaine on Amazon…

So all you have to do is create a new game object in your hierarchy and attach a trigger collider and a script that contains the code seen below. Now you have a collectible game object which you can use as a medkit or whatever in order to restore your player’s health in the game.

And voila!…

--

--

Adam Reed

Hi, my name is Adam Reed and I am a software engineer specializing in Unity and C# development. Feel free to scroll through and check out some of my work!