Jump to content

Screen Effects


Recommended Posts

What you mean are widgets, right? The simplest would be to spawn a coloured square, I do that for blindness in Alchemical Brewage.

 

You could also look into bloodover, iceover and heatover. Sorted by complicatedness.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...