Re: Altar and counter
Posted: Wed Oct 10, 2012 9:47 pm
or this
defineObject{
name = "altar_ogre",
class = "Altar",
model = "assets/models/env/altar.fbx",
placement = "floor",
onInsertItem = function(self, item)
local allowed = {"ogre_hammer"}
for i = 1, #allowed do
if item.name == allowed then
return item.name == allowed and self:getItemCount() == 0
end
end
end,
editorIcon = 52,
}
altar
Event = activate \\\ Action = decrement
Event = deactivate \\\ Action = increment
counter
Event = any \\\ Action = toggle
Work 3x Altar and 3 ogre hammer
1 remove hammer = door close
defineObject{
name = "altar_ogre",
class = "Altar",
model = "assets/models/env/altar.fbx",
placement = "floor",
onInsertItem = function(self, item)
local allowed = {"ogre_hammer"}
for i = 1, #allowed do
if item.name == allowed then
return item.name == allowed and self:getItemCount() == 0
end
end
end,
editorIcon = 52,
}
altar
Event = activate \\\ Action = decrement
Event = deactivate \\\ Action = increment
counter
Event = any \\\ Action = toggle
Work 3x Altar and 3 ogre hammer
1 remove hammer = door close
