prefabs/marbletree.lua
78910111213141516
local prefabs =
{
--marble drops
"marble",
}
local function onsave(inst, data)
data.anim = inst.animnumber
end
789101112131415161718192021
local prefabs =
{
"marble",
}
SetSharedLootTable( 'marble_tree',
{
{'marble', 1.0},
{'marble', 0.5},
})
local function onsave(inst, data)
data.anim = inst.animnumber
end
4041424344454647
MakeObstaclePhysics(inst, 0.1)
inst:AddComponent("lootdropper")
inst.components.lootdropper:SetLoot({"marble"}) --Add other loot?
inst.components.lootdropper:AddChanceLoot("marble", 0.5)
if animnumber and animnumber > 0 then
inst.animnumber = animnumber
45464748495051
MakeObstaclePhysics(inst, 0.1)
inst:AddComponent("lootdropper")
inst.components.lootdropper:SetChanceLootTable('marble_tree')
if animnumber and animnumber > 0 then
inst.animnumber = animnumber