V0.1.0 - KH
UI Trouble
Author: Kevin Hall
Posted on 07/6/24
THE PROBLEM
We were all very excited to get our spell system integrated into our game! It was my job to hook up the UI portion of the project. So I got started on updating the HUD widget to include the cooldown effect on the spell images, but also was able to add the current spell amount to each spell! This did not come without struggle! I had first made multiple individual functions for each spell to check if it was on cool down or not and then updated the progress bar. I then had 4 separate binds for all the different functions and it was causing multiple bugs, for example if I used a spell it would put all the spells ui elements on cool down, and then depending on what spell I had selected all the ui elements would be on cool down or not on cooldown. The desired behavior is that each individual element will be on cool down or not depending on their individual cooldown state.
THE SOLUTION
I deleted the unneeded functions and just made one function that uses a switch to determine what spell we are updating, then a branch node for saying whether it is on cooldown or not. Setting the progress bar on the widget to the appropriate alpha, whether the branch returns true or false. All of this led me to being able to do pretty much the same thing for the spell uses on the text variable hooked up to the widget
Get Plight of the Gods
Plight of the Gods
Fight your inner self to heighten your inner self
Status | Prototype |
Authors | acidwalrusdigital, ilrathCXV (FM), KevinHall14, MysticF0x, Lhans |
Genre | Fighting, Adventure, Role Playing |
Tags | 3D, casting, Fantasy, Magic, melee, Singleplayer, student |
More posts
- Devlog Update: Plight of the Gods is Now Live!71 days ago
- V0.1.3 - KHJul 26, 2024
- V0.1.3-Devlog-ENJul 25, 2024
- V.0.1.3 Devlog - LHJul 25, 2024
- v0.1.3 - DevLog - JRJul 25, 2024
- V0.1.2Jul 20, 2024
- V0.1.2 Devlog - LHJul 20, 2024
- V0.1.2 Devlog-ENJul 18, 2024
- V0.1.1 Devlog-KHJul 13, 2024
- v0.1.1 DevLog - JRJul 12, 2024
Leave a comment
Log in with itch.io to leave a comment.