Check out the hero.lua file and look at the collision() function…
function instance:collision( event ) local phase = event.phase local other = event.other local y1, y2 = self.y + 50, other.y - ( other.type == "enemy" and 25 or other.height/2 ) local vx, vy = self:getLinearVelocity() if phase == "began" then if not self.isDead and ( other.type == "blob" or other.type == "enemy" ) then if y1 \< y2 then -- Hopped on top of an enemy other:die() elseif not other.isDead then -- They attacked us self:hurt() end elseif self.jumping and vy \> 0 and not self.isDead then -- Landed after jumping self.jumping = false if not ( left == 0 and right == 0 ) and not instance.jumping then instance:setSequence( "walk" ) instance:play() else self:setSequence( "idle" ) end end end end
Line 108 has the types that cause damage. Just add your type in…