custom breakable object
Posted: Sun Jan 11, 2015 11:54 pm
I ve defined a breakable mine_support_wall but I can't break it with melee weapon. It works only with throwing weapons, or spells.
Please can someone tell me what I ve done wrong?
Please can someone tell me what I ve done wrong?
SpoilerShow
Code: Select all
--mine wall support breakable
defineObject{
name = "mine_support_wall_01_block",
baseObject = "base_obstacle",
components = {
{
class = "Model",
model = "assets/models/env/mine_support_wall_01.fbx",
staticShadow = true,
},
{
class = "Door",
sparse = true,
hitSound = "impact_blunt",
},
{
class = "Obstacle",
hitSound = "barrel_hit",
hitEffect = "hit_wood",
},
{
class = "Health",
health = 50,
immunities = { "poison" },
spawnOnDeath = "barrel_crate_block_broken",
onDie = function(self)
self.go:playSound("barrel_die")
end, },
{
class = "Controller",
},
},
placement = "wall",
editorIcon = 160,
automapIcon = 88,
minimalSaveState = true,
}