Jump to content

Recommended Posts

Hello. I have an idea for a small mod that makes it so tallbirds drop two drumsticks upon death along with it's original loot. Only problem is that I don't quite know to code this feature. Can anyone lend me code for this to work? I case you were wondering, I want this to work in Don't Starve TOGETHER. Not solo Don't Starve. Though if the mod has good popularity and is frequently requested, I'll make a solo Don't Starve port.

AddPrefabPostInit("tallbird", function(inst)
    if inst.components.lootdropper ~= nil and type(inst.components.lootdropper.loot) == "table" then
        inst.components.lootdropper.loot = GLOBAL.ExtendedArray(inst.components.lootdropper.loot, "drumstick", 2)
    end
end)
Edited by yanecc

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...