Skiz_2016 Posted February 28, 2017 Share Posted February 28, 2017 I need a code for losing hp with a specific character during the daytime and to allow him to eat nightmare fuel and regenerate hp. Can someone help me? Link to comment https://forums.kleientertainment.com/forums/topic/75126-code-request/ Share on other sites More sharing options...
Amalleus Posted March 3, 2017 Share Posted March 3, 2017 I may tell you step by step what to do: 1. Using AddPrefabPostInit (adds some code to existing prefab) function add component "edible" to your nightmare fuel. Make it some custom food type and add values of hunger, sanity, health restored by it. 2. Using AddSimPostInit (add some code to current character) function add filter: If inst.prefab == "yourcharacter" then --inst is character instance from function --add there "able to eat" and "prefer to eat" your custom food type end 3. What we done - your nightmare fuel became food with your custom food type which means nobody can eat it. After that you added to your character "yourcharacter" option to eat this type of food. Hope this will help you Link to comment https://forums.kleientertainment.com/forums/topic/75126-code-request/#findComment-876907 Share on other sites More sharing options...
TheKingDedede Posted March 10, 2017 Share Posted March 10, 2017 @ImDaMisterL, I'd argue that this should be moved, so as to allow this thread to get more coverage. Link to comment https://forums.kleientertainment.com/forums/topic/75126-code-request/#findComment-880698 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