BushmannGG1392 Posted November 16, 2018 Share Posted November 16, 2018 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) Link to comment 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 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.