BushmannGG1392 Posted November 16, 2018 Share Posted November 16, 2018 (edited) Here's what I have, but I don't think I'm doing it right and how do I add it not taking health?: local function postInitFunc(reader) if reader.components.inventory:Has("nightmarefuel", 1) then reader.components.inventory:ConsumeByName("nightmarefuel", 1) end end AddPrefabPostInit("waxwelljournal", postInitFunc) Edited November 17, 2018 by maxisawesome101 Link to comment https://forums.kleientertainment.com/forums/topic/98973-need-help-trying-to-make-maxwells-book-not-take-away-health-and-not-use-fuel/ Share on other sites More sharing options...
Backtalker Posted December 10, 2018 Share Posted December 10, 2018 I'll take a look to see what you can do and get back to you on this! If you do something kinda like this, function bookread(argshere) --function here end function Mod(inst) if inst.prefab == nil then return end if inst.prefab == "waxwell" then for _,item in pairs(GetPlayer().components.inventory.itemslots) do if item.prefab == "waxwelljournal" then item.book.onread = bookread end end end if item.prefab == "waxwelljournal" then item.book.onread = bookread end end AddPrefabPostInitAny(Mod) I think you'll get the desired result. Link to comment https://forums.kleientertainment.com/forums/topic/98973-need-help-trying-to-make-maxwells-book-not-take-away-health-and-not-use-fuel/#findComment-1129674 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