Jump to content

Recommended Posts

Put this in modmain:

AddPrefabPostInit("healingsalve", function(inst)	local old = inst.components.healer.Heal	inst.components.healer.Heal = function(self, target)		if target.prefab == "wilson" then			return false		end		return old(self, target)	endend)

and replace wilson with your character's prefab name.

 

We override the healer component of the healing salve, especifically, to disable the heal function when used on your character.

Put this in modmain:

AddPrefabPostInit("healingsalve", function(inst)	local old = inst.components.healer.Heal	inst.components.healer.Heal = function(self, target)		if target.prefab == "wilson" then			return false		end		return old(self, target)	endend)

and replace wilson with your character's prefab name.

 

We override the healer component of the healing salve, especifically, to disable the heal function when used on your character.

 

Hey. My character is finish now and i played some game, now i got a bug.

if i host the game and a client pick my char, his game will crash if a healingssalve drops somewhere.

"Nil value expected"

 

why?

 

AddPrefabPostInit("healingsalve", function(inst)	if not GLOBAL.TheWorld.ismastersim then		return	end    local old = inst.components.healer.Heal    inst.components.healer.Heal = function(self, target)        if target.prefab == "wilson" then            return false        end        return old(self, target)    endend)

@hummelchen

Edited by DarkXero

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...