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)
}
}
}
Not obstacle thicket and basic component tut please ?
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Not obstacle thicket and basic component tut please ?
A trip of a thousand leagues starts with a step.
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: Not obstacle thicket and basic component tut please ?
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 ?
{
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 ?
A trip of a thousand leagues starts with a step.