rons0n Posted May 26, 2015 Share Posted May 26, 2015 Is there a way to do without using the the prefab(e.g. Telltale heart) but on the recipe itself. How would I go about this? Much is appreciated. Link to comment https://forums.kleientertainment.com/forums/topic/54458-drain-sanity-and-health-upon-making-item/ Share on other sites More sharing options...
Seiai Posted May 27, 2015 Share Posted May 27, 2015 (edited) @rons0n, u probably wont be able to directly add any functionalities to the recipes, but maybe the game pushes an event on your character, when u craft something, so u could add a listener to your characterprefab(or add listeners to all players with some postinit-function in your modmain, if u want it to affect all players). Edited May 27, 2015 by Seiai Link to comment https://forums.kleientertainment.com/forums/topic/54458-drain-sanity-and-health-upon-making-item/#findComment-640993 Share on other sites More sharing options...
DarkXero Posted May 27, 2015 Share Posted May 27, 2015 On the DoBuild of builder you have-- If you have a onBuild function on your character's builder component-- You will run onBuild when you build something-- Params: builder(self.inst), product(prod)if self.onBuild ~= nil then self.onBuild(self.inst, prod)end-- If you have a onBuilt function on a prefab-- You will run onBuilt when you build that something-- Params: product(prod), builder(self.inst)prod:OnBuilt(self.inst) Link to comment https://forums.kleientertainment.com/forums/topic/54458-drain-sanity-and-health-upon-making-item/#findComment-640996 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