bobenhbenh Posted February 18, 2020 Share Posted February 18, 2020 (edited) I'm making a mod that set more loot for mob and boss this work: AddPrefabPostInit("hound", function(inst) local SetSharedLootTable = GLOBAL.SetSharedLootTable SetSharedLootTable( 'hound', { {'houndstooth', 1.0}, {'houndstooth', 1.0}, {'monstermeat', 1.0}, }) end) but this isn't work :< AddPrefabPostInit("deerclops", function(inst) local SetSharedLootTable = GLOBAL.SetSharedLootTable SetSharedLootTable( 'deerclops', { {'deerclops_eyeball', 1.0}, {'deerclops_eyeball', 1.0}, {'meat', 1.0}, {'meat', 1.0}, {'meat', 1.0}, {'meat', 1.0}, {'meat', 1.0}, {'meat', 1.0}, }) end) Edited February 18, 2020 by bobenhbenh Link to comment https://forums.kleientertainment.com/forums/topic/115854-help-why-my-code-doesnt-work/ Share on other sites More sharing options...
Desblat Posted February 19, 2020 Share Posted February 19, 2020 If loot table is a local variable you can not modify it. You need to create New one and assign it to the mob. Link to comment https://forums.kleientertainment.com/forums/topic/115854-help-why-my-code-doesnt-work/#findComment-1309012 Share on other sites More sharing options...
bobenhbenh Posted February 19, 2020 Author Share Posted February 19, 2020 16 minutes ago, Desblat said: If loot table is a local variable you can not modify it. You need to create New one and assign it to the mob. Can you give me an instruction? Thank you so much Link to comment https://forums.kleientertainment.com/forums/topic/115854-help-why-my-code-doesnt-work/#findComment-1309013 Share on other sites More sharing options...
Ultroman Posted February 22, 2020 Share Posted February 22, 2020 Perhaps take a look at the many mods on the workshop that also do this? They're an invaluable resource. Link to comment https://forums.kleientertainment.com/forums/topic/115854-help-why-my-code-doesnt-work/#findComment-1309714 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