Jump to content

Recommended Posts

Ok, i'll give it a shot.

 

 

 

EDIT:

I just didn't understand this part of the code, that exists in the 3 widgets you mentioned. Can you clarify this part? ;-;

function BloodOver:OnUpdate(dt)        -- ignore abnormally large intervals as they will destabilize the math in here    if dt > 0.1 then return end        local delta = self.base_level - self.level    if math.abs(delta) < .025 then        self.level = self.base_level    else        self.level = self.level + delta*dt*self.k    end    if self.base_level > 0 and not IsPaused() then        self.time_since_pulse = self.time_since_pulse + dt        if self.time_since_pulse > self.pulse_period then            self.time_since_pulse = 0                        if not self.owner.components.health:IsDead() then                TheInputProxy:AddVibration(VIBRATION_BLOOD_OVER, .2, .3, false)              end        end    end    if self.level > 0 then        self:Show()        self.bg:SetTint(1,1,1,self.level)    else        self:StopUpdating()        self:Hide()    endend

 

Edited by TheShadeofTheNorth

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...