Fakhthal Posted September 12, 2015 Share Posted September 12, 2015 For the mighty forum members, i need ur help with scripts to my character mod. My character is mad warrior enjoying fights, so I need for him adequate Script, additionally he does not like flowers and eats only prepared food. Going to the point, the character during the fight instead of losing sanity should regenerate it. By killing restore his life, as Wigfrid, able to eat only cooked food over a fire or in a pot, otherwise loses 20 sanity, the same is the collection of flowers and wearing a garland, it must result in the loss of sanity. sorry for my English, I don't have too many opportunities to use it in practice Link to comment Share on other sites More sharing options...
BlueSideWind Posted September 12, 2015 Share Posted September 12, 2015 well here's one way inst:ListenForEvent("entity_death", function(wrld, data) if data.cause == inst.prefab then local delta = 999999999999999 -- amount inst.components.health:DoDelta(delta) inst.components.sanity:DoDelta(delta) inst.components.hunger:DoDelta(delta) end end, GetWorld())and of course you can change the amount to anything Link to comment Share on other sites More sharing options...
Fakhthal Posted September 12, 2015 Author Share Posted September 12, 2015 Could you give me an example of using this script with specific functions and values, because I only just begun my adventure with the creation of mods characters or other? 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