Personal work – PotionMan

2nd March 2024 – Initial work

I want to keep practicing blueprints since they’re still an incredibly important aspect of game design for prototyping mechanics as well as simply just using them in tandem with C++. That and I need a break from playing Helldivers 2 (love that game but I’m addicted).

Unfortunately I decided to blog about my work after the fact rather than before and during.

I like to credit the potions used in this test were made by Ergoni, sourced from their sketchfab page here https://sketchfab.com/3d-models/potions-90e0258b906d442c876075fc46ca5f18

I started off wanting to just make a diegetic inventory of potions since I really liked talking about it in my diegesis essay.

I blew a lot of time making functions with pass-by references to handle all the display potions, but overall we have 4 potions displayed on the back: Health, Mana, Yellow and Purple. I had in mind making the first 3 self-use items and the purple one as a throwable and with that, I made multiple of them appear on the players back to track how many they had available to throw while the others have a number to track which both disappear when at 0.

These were setup by making static meshes on the player blueprint attached to spine_05, excluding the first purple potion which is attached to the hand. Text renders are created as child components to the respective potions they track.

I set up some test inputs to modify the value of each of these, I feel particularly clever using a shift keybind to change whether it’ll increase or decrease, it’s a lot nicer than setting up 2 different keybind to increase/decrease each variable. Also the fact you dont need to mess around with enhanced inputs it’s nice since input functions are all already set up.

Increment potion takes these values to update whatever it wanted to update, and calls the holster update function after so they the diegetic inventory matches the new values.

Due to have 2 different methods of tracking potions (text counter versus multiple potions), I added a branch to split the logic between the two versions.
The multiple potions took a bit of extra work to figure out but it seemed like the right solution (anything other than nesting IF statements).

last thing I’ve done today is added the ability to throw these potions.

I really like doing these little personal works to make niche mechanics/systems, they’re a touch of love that I’m passionate about adding in my usual games.

Leave a comment

Your email address will not be published. Required fields are marked *