Jump to content

Explosion chest trap is able to drop loots for twice


Littlefat1213
  • Pending

 

 

-- in scenarios/chest_explosion.lua
local function triggertrap(inst)
    inst:AddComponent("lootdropper")
    inst.components.lootdropper:SetLoot(drop_loot)
    inst.components.lootdropper:DropLoot()
    --give the chest a loot dropper.
    --make the chest drop gunpowder and the fire object from fire hounds.
end

there have been an existed lootdropper component for the chest, so when you trigger the trap, it drops two more boards which is the loots for destroyed and it drops the total loots again when destroyed.


Steps to Reproduce

As Above




User Feedback


There are no comments to display.



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...