openman_V Posted February 11, 2022 Share Posted February 11, 2022 Hello there! i was thinking of making Boss Dish when i found out that Deerclop drops edible eye. I want to make dish that help with overheating and freeze mobs on hit. Where do i find ice staff freezing ability and apply it to new recipe? This is code snippet of new recipe - Stuffed Eye Spoiler stuffedeye = { test = function(cooker, names, tags) return (names.deerclops_eyeball) and tags.veggie >= 1.5 and not tags.meat and not tags.inedible and not tags.egg end, priority = 30, foodtype = FOODTYPE.VEGGIE, health = UNING.HEALING_HUGE, hunger = TUNING.CALORIES_SUPERHUGE, sanity = -TUNING.SANITY_MED, temperature = TUNING.HOT_FOOD_BONUS_TEMP, temperatureduration = TUNING.BUFF_FOOD_TEMP_DURATION, nochill = true, perishtime = TUNING.PERISH_SLOW, cooktime = 0.75, potlevel = "low", tags = { "masterfood" }, floater = {nil, 0.1, 0.7}, }, Thanks for attention! Link to comment https://forums.kleientertainment.com/forums/topic/137495-help-me-out-w-warlys-specific-boss-dish/ Share on other sites More sharing options...
Monti18 Posted February 16, 2022 Share Posted February 16, 2022 You will need to add inst.components.eater:SetOnEaten() to your food prefab. The staff freezing ability can be found in staff.lua Spoiler --food prefab local function Freeze(inst,data) if data and data.target then if data.target.components.freezable ~= nil then data.target.components.freezable:AddColdness(1) data.target.components.freezable:SpawnShatterFX() end end end local function OnEaten(inst,eater) if eater then eater:ListenForEvent("onattackother",Freeze) eater:DoTaskInTime(60,function() eater:RemoveEventCallback("onattackother",Freeze) --change the time to whatever you want, like this it will remove the ice attack after 1 min. end end -- in the fn of the prefab inst.components.edible:SetOnEatenFn(OnEaten) Here is some code that make it work 1 Link to comment https://forums.kleientertainment.com/forums/topic/137495-help-me-out-w-warlys-specific-boss-dish/#findComment-1540327 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