Sometimes Math is Hard
Author: Devon Flynn
Posted on 6/26/2025
This week, my main focus was implementing our Roguelike card system. This system let’s a player choose one of three random cards that will affect their health, speed, or stamina stats. In creating the SetStats function on the Player Character script, I ran into quite a few issues with implementing the math adjustment. Since the stat modifier is just a percentage, my initial thought was to multiply the original stat by the modifier.
After some brief play testing, I realized that this equation would change the original stat to the percentage of the modifier. For instance, if health was 50 and the modifier was 5%, it would set the original stat to 2.5. Math is not my strong suit, so this took me longer to figure out than I care to admit. Ultimately, I figured out that I needed to multiply the original stat by the modifier, then add that to the original stat. Once I implemented that equation, the stat changes began working beautifully.

Get Zombats
Zombats
Third-person Ability Shooter
| Status | In development |
| Authors | Wombat Studios, JRarrat, Josh The Dark, iWannaNuhh, aabunada, Devon Flynn |
| Genre | Action |
| Tags | 3D, Third-Person Shooter, Zombies |
More posts
- Damage Feedback: Ragdoll Deaths and Screen FlashJun 27, 2025
- Shattering Expectations - Ben BissettJun 27, 2025
- The Journey to Multiplayer, Part 3 - Joshua NewtonJun 26, 2025
- Audio in C++ - Ali AbunadaJun 26, 2025
- Guns and Ballistics - Ben BissettJun 21, 2025
- Proper Ragdolling - Ali AbunadaJun 21, 2025
- Wave Based Spawning and Spawner ManagementJun 21, 2025
- The Journey to Multiplayer, Part 2 - Joshua NewtonJun 20, 2025
- Pause Menu DoublingJun 20, 2025
Leave a comment
Log in with itch.io to leave a comment.