Medic!

Health packs

Thank you to Jared Amlin for the wonderful health pack icon that he allowed for people in the GameDevHQ course to use.

This time I did a health pickup. I think I might try to start adding some weights to the spawn rates for the items because the way I have it set up currently, it rather sporadic. I’m not saying that isn’t a good way to do it, it just would feel like to see one or certain power up more often and other ones that might be more powerful or special and make them more rare.

The way I have the power up system set up for collection is using the Gameobject’s tag. I have a triple shot tag, speed boost, shield and now adding in this: Health. Upon collection, I do a switch statement to go through to check what to do.

For the health pack, it’s just “reversing” the damage done. Increases the lives count by 1 (probably should limit it to 3…) and then turns off the damage animations on the player.

And you can also see how I ended up doing my other power ups. Probably will change this to a slightly different modular set up using an int ID rather than the tag. It’s much easier to keep track of.

Well the next thing on the list would be another power up, a weapon type, getting the camera to shake and thinking of a way to merge or enhance the powerups.

On to the next.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store