. . . Posted June 22, 2019 Share Posted June 22, 2019 Hello, I was wondering if anyone know's how to make a prefab capable of putting out fires like from the firepit and stuff. I looked in inv_rocks_ice and thought the "smotherer" component would work, but it seems to do nothing .. Thanks for any help and for reading, have a great day ! Link to comment https://forums.kleientertainment.com/forums/topic/107801-how-to-make-item-be-able-to-extinguish-fires/ Share on other sites More sharing options...
CarlZalph Posted June 22, 2019 Share Posted June 22, 2019 ACTIONS.SMOTHER.fn = function(act) if act.target.components.burnable and act.target.components.burnable:IsSmoldering() then local smotherer = act.invobject or act.doer act.target.components.burnable:SmotherSmolder(smotherer) return true end end ACTIONS.MANUALEXTINGUISH.fn = function(act) if act.invobject:HasTag("frozen") and act.target.components.burnable and act.target.components.burnable:IsBurning() then act.target.components.burnable:Extinguish(true, TUNING.SMOTHERER_EXTINGUISH_HEAT_PERCENT, act.invobject) return true end end So, from this, you should give it the frozen tag to let it extinguish. Likewise with the tag you automagically get the events "firemelt" and "stopfiremelt" that you can choose to handle. There is the alternative that you could create your own action for the item and make use of the wateryprotection component like what waterballons use. --master post init inst.components.wateryprotection.extinguishheatpercent = TUNING.WATERBALLOON_EXTINGUISH_HEAT_PERCENT inst.components.wateryprotection.temperaturereduction = TUNING.WATERBALLOON_TEMP_REDUCTION inst.components.wateryprotection.witherprotectiontime = TUNING.WATERBALLOON_PROTECTION_TIME inst.components.wateryprotection.addwetness = TUNING.WATERBALLOON_ADD_WETNESS --action callback inst.components.wateryprotection:SpreadProtection(inst) or inst.components.wateryprotection:SpreadProtectionAtPoint(x, y, z, dist, noextinguish) Link to comment https://forums.kleientertainment.com/forums/topic/107801-how-to-make-item-be-able-to-extinguish-fires/#findComment-1212869 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