Milllk Posted September 21, 2015 Share Posted September 21, 2015 like this give him an item,then he become book builder and reader now. i try add the bookbuilder and reader in the item it doesnt work. local function item() local inst = createentity() ... inst:AddTag("bookbuilder") inst:AddComponent("reader") even like this local owner = inst.components.inventoryitem ~= nil and inst.components.inventoryitem.owner or nil if owner thenowner:AddTag("bookbuilder") owner:AddComponent("reader")end but it doesnt work unless i set the book builder and reader in the character's original define file. Link to comment https://forums.kleientertainment.com/forums/topic/58013-is-there-any-possible-for-setting-character-book-builder-and-reader-dynamically/ Share on other sites More sharing options...
Milllk Posted September 21, 2015 Author Share Posted September 21, 2015 also i have tried this add in the modmain.lua Recipe("book_gardening", {Ingredient("papyrus", 2), Ingredient("seeds", 1), Ingredient("poop", 1)}, CUSTOM_RECIPETABS.BOOKS, {SCIENCE = 0}, nil, nil, nil, nil, "booksupport") then the item local function equip(inst,owner)... owner:AddTag("booksupport")end doesnt work Link to comment https://forums.kleientertainment.com/forums/topic/58013-is-there-any-possible-for-setting-character-book-builder-and-reader-dynamically/#findComment-674723 Share on other sites More sharing options...
Milllk Posted September 21, 2015 Author Share Posted September 21, 2015 i dont want this any more..the book function can just be written in this item..if there really has a solution for this..maybe can be used for anywhere else. Link to comment https://forums.kleientertainment.com/forums/topic/58013-is-there-any-possible-for-setting-character-book-builder-and-reader-dynamically/#findComment-674748 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