Struggling with a passive regeneration
Hello, uhm... I'm working with a mod for a game which is not really my own, I've "owned" the mod for a couple years now but the mod was not originally my own, I mention that because I don't really understand how everything in here actually works? Anyways, what I'm currently struggling to do is add a little bit of passive regneration to a dome shield. In the screenshot are two bits of code, the top half is unrelated to passive regenration but you can see the bottom half is heavily based off the top half. What the top half does is check to see if the shield is at or above 40% health while the shield is off, in which case it will turn itself back on (and set the
This is my first time posting here so let me know if I did something wrong in terms of any rules here
CurrentDamageSustained to 40% of ShieldStats.MaxEnergy. The bottom half is my attempt to add a passive regeneration. What I'm wanting to do is, if the shield is on and not at full health, regenerate ShieldStats.PassiveRegen amount of health every 2 seconds (the 2 seconds bit, as you can see, is not added yet.)) Admittedly, I am working with a very complex mod while not having any C# coding experience outside of this mod, so I've been able to do a couple small things before, but only with guidance from other people. Now that I'm in this server, I want to try asking in here.This is my first time posting here so let me know if I did something wrong in terms of any rules here


