IgnisDraconi Posted December 11, 2016 Share Posted December 11, 2016 Hello! I'm kind of a noob in this area... I'm trying to make a character with two perks: 1. Slow healt autoregeneration. 2. Gain sanity from battle (like Wigfrid). So: I hope I have the "regen" part of the code... what you think? But I can't figure out how to do the sanity thing... anyone? Thanks for the advices Quote -- This initializes for the host only local master_postinit = function(inst) -- choose which sounds this character will play inst.soundsname = "wilson" -- Stats inst.strength = "minregen" inst.components.health:SetMaxHealth(120) inst.components.health:StartRegen(1, 2) inst.components.hunger:SetKillRate(5) inst.components.hunger:SetMax(200) inst.components.sanity:SetMax(200) inst.components.combat.damagemultiplier = 1 inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.5) inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.5) inst:ListenForEvent("healthdelta", onhealthchange) inst:ListenForEvent("hungerdelta", updatestats) inst.OnLoad = onload inst.OnNewSpawn = onload end Link to comment Share on other sites More sharing options...
IgnisDraconi Posted January 7, 2017 Author Share Posted January 7, 2017 I need some moderator to erase this post I don't know how... Link to comment Share on other sites More sharing options...
. . . Posted January 8, 2017 Share Posted January 8, 2017 7 hours ago, IgnisDraconi said: I need some moderator to erase this post I don't know how... Click on moderating options then press hide . Link to comment Share on other sites More sharing options...
IgnisDraconi Posted January 8, 2017 Author Share Posted January 8, 2017 I don't know where the moderating options are :'v... sorry 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