Re: (Object Assets) Empty Catacomb as Alcove and other alcov
Posted: Sun Sep 30, 2012 3:07 am
Here it be in all it's glory....thanks Neikun & Batty for contributions
Official Legend of Grimrock Forums
http://grimrock.net/forum/
Code: Select all
defineObject{
name = "wall_lantern_visual",
class = "Alcove",
anchorPos = vec(0, 0, 0),
targetPos = vec(0, 0, 0),
targetSize = vec(0, 0, 0),
model = "assets/models/env/wall_lantern.fbx",
placement = "wall",
replacesWall = false,
editorIcon = 92,
}
Code: Select all
defineObject{
name = "wall_lantern_logical",
class = "Alcove",
anchorPos = vec(0, 1.65, 0),
targetPos = vec(0, 1.65, 0),
targetSize = vec(0.2, 0.2, 0.2),
onInsertItem = function(self, item)
if item.name == "torch" or "everlasting_torch" then
local id = self.level.."_"..self.x.."_"..self.y.."_"..self.facing
xface = {0, 1.18, 0, -1.18}
zface = {1.18, 0 , -1.18, 0}
spawn("fx", self.level, self.x, self.y, 0, "flame"..id)
local flame = findEntity("flame"..id)
flame:setParticleSystem("torch")
flame:translate(xface[self.facing + 1], 1.85, zface[self.facing + 1])
spawn("fx", self.level, self.x, self.y, 0, "light"..id)
local light = findEntity("light"..id)
light:setLight(0.7, 0.5, 0.5, 10, 12, 36000, true)
light:translate(xface[self.facing + 1], 1.85, zface[self.facing + 1])
playSoundAt("torch_burning", self.level, self.x, self.y)
self:destroy()
end
end,
placement = "wall",
replacesWall = false,
editorIcon = 92,
}
oh nice, that may work but I'm gonna add level to it which should make a unique id because 3_5 on different levels will conflict so adding level in front should fix it such as 1_3_5 and 2_3_5. oooh and facing too then it'll be unique!Komag wrote:Maybe the ID could just be the coordinates together, such as 3_5, so that there really is no problem with 3,5 and 5,3, because someone may in fact run into this problem in some room near the diagonal of the dungeon map
But very good work, those look cool!
Code: Select all
defineObject{
name = "statue_alcove_spear",
class = "Alcove",
anchorPos = vec(0, 2, -0.2),
anchorRotation = vec(0,0,0),
targetPos = vec(0,2, -0.2),
targetSize = vec(0.3, 0.3, 0.3),
model = "assets/models/env/temple_gladiator_statue_spear.fbx",
placement = "wall",
replacesWall = true,
editorIcon = 92,
}
Code: Select all
defineObject{
name = "statue_alcove_spear_helmet",
class = "Alcove",
anchorPos = vec(0.027, 2.115, 0.225),
anchorRotation = vec(13,1,1.9),
targetPos = vec(0.027,2.13, 0.25),
targetSize = vec(0.3, 0.3, 0.3),
model = "assets/models/env/temple_gladiator_statue_spear.fbx",
onInsertItem = function(self, item)
return item.name == "legionary_helmet" and self:getItemCount() == 0
end,
placement = "wall",
replacesWall = true,
editorIcon = 92,
}
Code: Select all
defineObject{
name = "statue_alcove_spear_shield",
class = "Alcove",
anchorPos = vec(0.34, 1.56, 0.18),
anchorRotation = vec(22,356,88.7),
targetPos = vec(0.34,1.56, 0.18),
targetSize = vec(0.3, 0.3, 0.3),
onInsertItem = function(self, item)
return item.name == "legionary_shield" and self:getItemCount() == 0
end,
placement = "wall",
replacesWall = true,
editorIcon = 92,
}