As it is, the easiest fix is to rename the AnimationComponent, like this:
Code: Select all
defineObject{
name = "floor_spike_trap_auto",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "assets/models/env/tomb_floor_spiketrap.fbx",
},
{
class = "FloorTrigger",
onActivate = function(self)
self.go.biscuits:play("activate")
self.go.tiledamager:enable()
end,
},
{
class = "Animation",
name = "biscuits",
animations = {
activate = "assets/animations/env/tomb_floor_spiketrap_hit.fbx",
},
},
{
class = "TileDamager",
attackPower = 50,
damageType = "physical", -- TODO: change to "pure"
screenEffect = "damage_screen",
cameraShake = true,
sound = "spike_trap",
floorTrap = true,
enabled = false,
onHitObstacle = function(self, obstacle)
if obstacle.go.name == "beach_thicket_01" then return false end
end,
onHitMonster = function(self, monster)
if monster.go.name == "air_elemental" then return false end
end,
},
{
class = "Controller",
onActivate = function(self)
self.go.biscuits:play("activate")
self.go.tiledamager:enable()
end,
},
},
editorIcon = 284,
}