Tykvesh Posted May 10, 2021 Share Posted May 10, 2021 Additional functionality for fans to disperse clouds. Quote local function DisperseCloud(inst) if inst.components.timer ~= nil and inst.components.timer:TimerExists("disperse") then inst.components.timer:SetTimeLeft("disperse", 0) end end local FANTARGET_CANT_TAGS = { "FX", "NOCLICK", "DECOR", "INLIMBO", "playerghost" } local FANTARGET_ONEOF_TAGS = { "smolder", "fire", "player" } local function OnUse(inst, target) local x, y, z = target.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x, y, z, TUNING.FEATHERFAN_RADIUS, nil, FANTARGET_CANT_TAGS, FANTARGET_ONEOF_TAGS) for i, v in pairs(ents) do if v.components.burnable ~= nil then -- Extinguish smoldering/fire and reset the propagator to a heat of .2 v.components.burnable:Extinguish(true, 0) end if v.components.temperature ~= nil then -- cool off yourself and any other nearby players v.components.temperature:DoDelta(math.clamp(TUNING.FEATHERFAN_MINIMUM_TEMP - v.components.temperature:GetCurrent(), TUNING.FEATHERFAN_COOLING, 0)) end end --todo: add a special tag to distinguish clouds FindEntity(target, TUNING.FEATHERFAN_RADIUS, DisperseCloud) end Link to comment https://forums.kleientertainment.com/forums/topic/129823-disperse-clouds-with-fans/ Share on other sites More sharing options...
minespatch Posted May 10, 2021 Share Posted May 10, 2021 1 hour ago, Tykvesh said: Additional functionality for fans to disperse clouds. Now that'd be a good update! Link to comment https://forums.kleientertainment.com/forums/topic/129823-disperse-clouds-with-fans/#findComment-1458766 Share on other sites More sharing options...
Well-met Posted May 10, 2021 Share Posted May 10, 2021 I like Link to comment https://forums.kleientertainment.com/forums/topic/129823-disperse-clouds-with-fans/#findComment-1458801 Share on other sites More sharing options...
Recommended Posts
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.