Jump to content

Need helps with character mod perk


Recommended Posts

I'm working on character mod to make an ice themed miner with the perks

 

*Starts with pickaxe

*less susceptible to cold, but hates heat

*Gains sanity and health from eating ice

 

I've already made the first two work but I'm lost on making the ice heal and increase sanity more for a specific character. I want it to heal 10 health and 20 sanity any help or guidance would be greatly appreciated  :love_heart:  

 

Link to comment
Share on other sites

I want to use this script too but the mod crashes with "variable 'inst' is not declared"

what could be the problem?

 

 

Many ways to do it.

 

Yet another one:

	inst:ListenForEvent("oneat", function(inst, data)		if data.food.prefab == "ice" then			inst.components.health:DoDelta(9.5)			inst.components.sanity:DoDelta(20)		end	end)

 

Link to comment
Share on other sites

I want to use this script too but the mod crashes with "variable 'inst' is not declared"

what could be the problem?

 

I think you just are putting it in the wrong part of the character.

that is either going in the common_postinit or in the master_postinit

90% sure it goes in the master. could be wrong. give it a try or wait and see if any one else knows.

*Shrugs* good luck though!

Link to comment
Share on other sites

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
 Share

×
  • Create New...