Search the Community
Showing results for tags 'overlay'.
-
Hey hey, I'm making a character and I'd be glad if yall could explain to me how the frost screen overlay that happens at 5 degrees or less works, how can I make it show using code?
-
-- Deals poison damage. local function DoPoisonDamage(inst) inst.components.health:DoDelta(-1, true, "poison") end -- OnAttackOther, deal poison damage every .33 seconds. local function onattackother(inst, data) if data.target and data.target.components.health and not data.target.components.health:IsDead() then -- No target players. if not data.target:HasTag("player") then -- Can't already be poisoned. if data.target.poisontask == nil then -- If conditions met; deal DoPoisonDamage value 3 times per second. data.target.poisontask = data.target:DoPeriodicTask(1/3, DoPoisonDamage) -- End poison damage @ 30 seconds. Deals 90 damage total. data.target.poisonwearofftask = data.target:DoTaskInTime(30, function(inst) inst.poisontask:Cancel() inst.poisontask = nil end) end end end end Okay, so this simply is some poison code I've been testing thanks to a friend. It's not strong initially but can cause the player to deal over a hundred damage with their bare fists over time, plus weapons increase the initial damage. My main issue, however, is that you can't see that damage is being dealt. Is there any way to either make an enemy flash a pink-purple when they take a damage from this or make an enemy turn pink-purple shaded until the effect is over? Either one works, I just want to know that they're still taking damage. Is there any way that is somewhat easy to do this? I couldn't think of any and figured the forums would be a bit more help than trying to study it myself. Thanks! Peace out.