Jump to content

Recommended Posts

Hello Survivors,

I got a tiny tainy question to you, could you get me the effect of the Jelly Beans? I would do it myself If I would know where to search, since there is no "jellybeans" prefab, and the "preparedfoods" file, which contents all the crock pot foods, sadly uses some sorts of data that I dont know how to acces,

It would be neat to hear from you about this information

Your beloved giant,
Dragonfly

This should probably do it:

inst.components.edible:SetOnEatenFn(function(inst, eater)
    if eater.components.debuffable ~= nil and
	not (eater.components.health ~= nil and
		eater.components.health:IsDead()) and
	not eater:HasTag("playerghost") then
	eater.components.debuffable:RemoveDebuff("healthregenbuff")
	eater.components.debuffable:AddDebuff("healthregenbuff", "healthregenbuff")
    end
end)
41 minutes ago, Zeklo said:

This should probably do it:


inst.components.edible:SetOnEatenFn(function(inst, eater)
    if eater.components.debuffable ~= nil and
	not (eater.components.health ~= nil and
		eater.components.health:IsDead()) and
	not eater:HasTag("playerghost") then
	eater.components.debuffable:RemoveDebuff("healthregenbuff")
	eater.components.debuffable:AddDebuff("healthregenbuff", "healthregenbuff")
    end
end)

What if I wanted to make it for a different stat aka Sanity

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...