I need this for this custom blocker, that block the party, but not the monsters.
SpoilerShow
Code: Select all
defineObject{
name = "blocker_party",
components = {
{
class = "Obstacle",
blockParty = true,
blockItems = true,
blockMonsters = false,
},
{
class = "Controller",
onActivate = function(self)
self.go.obstacle:enable()
end,
onDeactivate = function(self)
self.go.obstacle:disable()
end,
onToggle = function(self)
if self.go.obstacle:isEnabled() then
self.go.obstacle:disable()
else
self.go.obstacle:enable()
end
end,
},
},
tags = { "scripting" },
placement = "floor",
editorIcon = 96,
}