Ability Icons and fighting with Unreal Widgets


This week  I updated the ability system so that it can now support ability icons. I also added two, well more like one and half, new abilities.  The ability class now has places for an icon, a greyed out version of an icon, and a image and text field for a key bind. Essentially, as you pick up gibs, your abilities now show as icons above your health that gradually fill up until they are unlocked. They also have some text one them to show numerically how many kills you need.  After the ability is unlocked, if its an active ability, using it will cause the ability to grey out once more and gradually fill back up to visualize the ability's cooldown. I had a number of issues battling with Unreal's UI system while trying to get this to work, but ultimately my major issue ended up being my own fault. Who would have thought. Essentially,  I was trying to spawn a generic icon widget into a horizontal box on the players HUD, then populate the icon with the abilities info, but for some reason, all the widget binds on the new icon instance were null. After slamming my head against a wall for a few days, I finally got  some extra eyes on it so I could feel stupid enough to solve my own problem. Turns out In pursuit of being clever (lazy), I wasn't spawning in the widget blueprint I had created as a child of my script (IE the place where I actually set up all the UI), I was spawning a brand new empty instance of my script class.  After I figured that out, it was mostly smooth sailing, but I still have to work on getting the icons to be a consistent size, as currently, the key bind/unlock requirement text can cause the widget to get very large or small depending on what they are set to.  After this was all set up, I was able to find a fix another bug because I was able to see the cooldowns. I had set something up last week that allowed the player to cancel the smoke form ability early by attacking, but as it turned out, the attack would 'end' the ability ANY time it was used, so if you had the smoke ability ready, then attacked, the smoke ability would go on cooldown. Luckily it was an easy fix once I saw that there was a problem in the first place.

The two abilities I added this week were the body swap, which lets you steal someone's body and leaves your old exploded host at your last location, and the ever so janky wall climb. The wall climb ability was a spur of the moment thing that essentially just sets the players maximum walk slope to 90 degrees. I'm almost certainly going to rework this ability as walking around with a 90 degree walk slope at all times makes for some rather interesting interactions with certain stair cases and doors. 

The other things I did this week were unplanned VFX, the main one being the death VFX. These weren't  something I was planning on implementing this week, but I was inspired by some of the other VFX I made for the abilities, and suddenly found my self 8 hours deep into tweaking the respawn, err, 'Animation.' These aren't really complete, so I'll be holding off on showing these for a little while.


Here's a video covering the ability situation in a bit more detail

Leave a comment

Log in with itch.io to leave a comment.