- --At this file to your scripts folder and include it in the init.lua by placing the line
import "mod_assets/scripts/alcoves.lua"
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,
}
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 item.name == "torch_everburning" then
spawn("wall_lantern_fx_"..self.facing, self.level, self.x, self.y, 0)
playSoundAt("wall_lantern_crackling", self.level, self.x, self.y)
self:destroy()
end
end,
placement = "wall",
replacesWall = false,
editorIcon = 84,
}
defineSound{
name = "wall_lantern_crackling",
filename = "assets/samples/env/torch_burning_01.wav",
loop = true,
volume = 0.5,
minDistance = 2,
maxDistance = 6,
}
defineObject{
name = "wall_lantern_fx_3",
class = "LightSource",
lightPosition = vec(-1.18, 1.85, 0),
lightRange = 12,
lightColor = vec(0.7, 0.5, 0.5),
brightness = 10,
castShadow = true,
particleSystem = "torch",
placement = "floor",
editorIcon = 88,
}
defineObject{
name = "wall_lantern_fx_2",
class = "LightSource",
lightPosition = vec(0, 1.85, -1.18),
lightRange = 12,
lightColor = vec(0.7, 0.5, 0.5),
brightness = 10,
castShadow = true,
particleSystem = "torch",
placement = "floor",
editorIcon = 88,
}
defineObject{
name = "wall_lantern_fx_1",
class = "LightSource",
lightPosition = vec(1.18, 1.85, 0),
lightRange = 12,
lightColor = vec(0.7, 0.5, 0.5),
brightness = 10,
castShadow = true,
particleSystem = "torch",
placement = "floor",
editorIcon = 88,
}
defineObject{
name = "wall_lantern_fx_0",
class = "LightSource",
lightPosition = vec(0, 1.85, 1.18),
lightRange = 12,
lightColor = vec(0.7, 0.5, 0.5),
brightness = 10,
castShadow = true,
particleSystem = "torch",
placement = "floor",
editorIcon = 88,
}
--Original post--
I know when I played Legend of Grimrock, I thought the catacombs were going to be interactive.
Now that we've been given an editor, it's very easy to do it ourselves! =D
Here's a empty dungeon catacomb turned into alcove, and tweaked to prevent clipping by a placed object.
Code: Select all
defineObject{
name = "dungeon_catacomb_alcove",
class = "Alcove",
anchorPos = vec(0, 0.75, 0.2),
targetPos = vec(0,1.3,0),
targetSize = vec(0.6, 0.5, 0.6),
model = "assets/models/env/dungeon_catacomb_empty.fbx",
placement = "wall",
replacesWall = true,
editorIcon = 92,
}
Unfortunately, I am only able to place things in dead-centre of the shelf.
And Idea how I might be able to change that to something wider?