Chippster Posted June 22, 2015 Share Posted June 22, 2015 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 Link to comment Share on other sites More sharing options...
DarkXero Posted June 22, 2015 Share Posted June 22, 2015 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 More sharing options...
KawaiiYumiko Posted July 13, 2015 Share Posted July 13, 2015 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 More sharing options...
DerpTime Posted July 13, 2015 Share Posted July 13, 2015 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_postinit90% 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 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