evergreen893401 Posted January 2, 2025 Share Posted January 2, 2025 Hello. I want to make a mod that makes it so clockworks drop electrical doodads when killed. Only problem is that when I tried to reuse code from my other mod, Tallbirds drop Drumsticks, I cant get the server to load. Here's the code I'm using: AddPrefabPostInit("knight", function(inst) if inst.components.lootdropper ~= nil then inst.components.lootdropper.loot = GLOBAL.ExtendedArray(inst.components.lootdropper.loot, "transistor", 2) end end) AddPrefabPostInit("bishop", function(inst) if inst.components.lootdropper ~= nil then inst.components.lootdropper.loot = GLOBAL.ExtendedArray(inst.components.lootdropper.loot, "transistor", 2) end end) AddPrefabPostInit("rook", function(inst) if inst.components.lootdropper ~= nil then inst.components.lootdropper.loot = GLOBAL.ExtendedArray(inst.components.lootdropper.loot, "transistor", 2) end end) AddPrefabPostInit("knight_nightmare", function(inst) if inst.components.lootdropper ~= nil then inst.components.lootdropper.loot = GLOBAL.ExtendedArray(inst.components.lootdropper.loot, "transistor", 0.33) end end) AddPrefabPostInit("bishop_nightmare", function(inst) if inst.components.lootdropper ~= nil then inst.components.lootdropper.loot = GLOBAL.ExtendedArray(inst.components.lootdropper.loot, "transistor", 0.33) end end) AddPrefabPostInit("rook_nightmare", function(inst) if inst.components.lootdropper ~= nil then inst.components.lootdropper.loot = GLOBAL.ExtendedArray(inst.components.lootdropper.loot, "transistor", 0.33) end end) Can anyone tell me how to get this to work? Link to comment https://forums.kleientertainment.com/forums/topic/162924-assistance-with-mod-creation/ 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