TheShadeofTheNorth Posted July 16, 2015 Share Posted July 16, 2015 Yes, It's another of my topics...again... yes... i know ... LOL I was thinking... is it possible to add screen effects to a function ? Like when the character get hit? Link to comment https://forums.kleientertainment.com/forums/topic/56209-screen-effects/ Share on other sites More sharing options...
Mobbstar Posted July 16, 2015 Share Posted July 16, 2015 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 https://forums.kleientertainment.com/forums/topic/56209-screen-effects/#findComment-654819 Share on other sites More sharing options...
TheShadeofTheNorth Posted July 16, 2015 Author Share Posted July 16, 2015 (edited) 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 July 16, 2015 by TheShadeofTheNorth Link to comment https://forums.kleientertainment.com/forums/topic/56209-screen-effects/#findComment-654873 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now