Page 1 of 1

Not obstacle thicket and basic component tut please ?

Posted: Fri Oct 31, 2014 9:08 pm
by cromcrom
I am not really easy with components yet. I would like to create a thicket that is not an obstacle. What am I doing wrong here please ?

defineObject{
name = "beach_thicket_damaged_crom",
baseObject = "beach_thicket_damaged",
components = {
{
class="Clickable",
onClick=function(self)

if math.random()<0.3 then
setMouseItem(spawn('branch').item)
hudPrint("You recover a branch from this damaged thicket.")
self.go:destroy()
end

if math.random()<0.5 then
self.go:spawn("beach_thicket_broken")
self.go:destroy()
hudPrint("This thicket is destroyed now !")
end
end
},
{
class="Obstacle",
obstacleComponent:setBlockParty(false)
}
}
}

Re: Not obstacle thicket and basic component tut please ?

Posted: Fri Oct 31, 2014 9:17 pm
by cromcrom
aw well, it seems that this works:

{
class="Obstacle",
BlockParty = false
}


But maybe there is a better way to do this, maybe disablig the obstacle component. Anyone can help about this please ?