The Custom Alcove Thread. (Neikun, Batty and Crisman)
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
Lol the free one is prettier.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
LOL thanks for finding & reporting that, I may have never found it. I lit a lantern with a rock lol. Anyway, It's fixed, here's the new script:flatline wrote:Batty, I've copied your stuff and it works fine except that it seems the script accepts ANY object to light the lanterns. When I fool around in the editor, I can put in a sling and still light one of the lanterns. At first, I thought the script lacked a "else"-parameter telling it to end if anything but a torch was inserted. I can't seem to fix it though. Thoughts?
Great work btw, and I'm quite new to scripting Grimrock so bear with me. I did manage to make some nice looking drainage floors with custom fires glowing far below and filling the room with smoke, so progress is being had.
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 item.name == "everlasting_torch" 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,
}
I really like the fire in the floor drainage! I'm gonna try that one myself.
edit: whoops, I guess it's "torch_everburning" and not "everlasting_torch" don't know how I did that.
Last edited by Batty on Thu Oct 04, 2012 3:23 pm, edited 2 times in total.
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
I've fixed the logical lantern script so it only turns on with a "torch" or "torch_everburning", but the item is not destroyed as the script suggests it should be... will look into that.flatline wrote: Batty, I've copied your stuff and it works fine except that it seems the script accepts ANY object to light the lanterns. When I fool around in the editor, I can put in a sling and still light one of the lanterns. At first, I thought the script lacked a "else"-parameter telling it to end if anything but a torch was inserted. I can't seem to fix it though. Thoughts?.
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)
hudPrint(item.name)
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,
}
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
The alcove not the item is destroyed so you can't light the lantern twice, dunno why you'd want to destroy the torch. The lantern has red embers/coals in it presumably with some fuel in them so the flame from the torch lights it and you keep the lit torch.Grimwold wrote:but the item is not destroyed as the script suggests it should be... will look into that.
Neikun suggested lighting the lanterns consumes an amount of fuel (say 20%) from the torch but (I think) there's no way atm to do that.
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
ah. that was my misunderstanding, sorry. I saw the destroy and thought it meant to destroy the item used for lighting.Batty wrote:The alcove not the item is destroyed so you can't light the lantern twice, dunno why you'd want to destroy the torch. The lantern has red embers/coals in it presumably with some fuel in them so the flame from the torch lights it and you keep the lit torch.Grimwold wrote:but the item is not destroyed as the script suggests it should be... will look into that.
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
Actually, that also makes game sense to me (that you'd have to use an entire torch to light a lantern) and might make things more strategically interesting for the player but you'd have to separately destroy the torch.
MAJOR EDIT: There is:
I guess it's time to actually read the entire reference.
MAJOR EDIT: There is:
andItem:setFuel(fuel)
Sets the remaining fuel (in seconds) for torches.
in the reference! You can handle lighting the lanterns however you want now and they're fully functioning - no more dead torch problem.Item:getFuel(fuel)
Returns the remaining fuel (in seconds) for torches.
I guess it's time to actually read the entire reference.
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
This means we can make a level where the player has to compare the benefits of rushinng ahead to light lanterns before his single lonely torch runs out, or rely on light spells and creeping in darkness. Is there any way to lower the ambient light in the dungeon, besides a constant darkness-spell?Batty wrote:Actually, that also makes game sense to me (that you'd have to use an entire torch to light a lantern) and might make things more strategically interesting for the player but you'd have to separately destroy the torch.
MAJOR EDIT: There is:andItem:setFuel(fuel)
Sets the remaining fuel (in seconds) for torches.in the reference! You can handle lighting the lanterns however you want now and they're fully functioning - no more dead torch problem.Item:getFuel(fuel)
Returns the remaining fuel (in seconds) for torches.
I guess it's time to actually read the entire reference.
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
I've looked at this a little but couldn't find anything. Beyond adjusting ambient light levels, I'd also like to adjust the effect that the light spell produces but I haven't found a way for that either.flatline wrote:This means we can make a level where the player has to compare the benefits of rushinng ahead to light lanterns before his single lonely torch runs out, or rely on light spells and creeping in darkness. Is there any way to lower the ambient light in the dungeon, besides a constant darkness-spell?
I'd also like to shut the lanterns off. You can destroy the LightSource object thus shutting off the flame but the crackling sound persists forever. I'll keep trying.
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
This is great. I must've read past those getFuel and setFuel commands a few times and not noticed.
The sound is a bit of an issue though... we really need a way to stop a looping sound. even if it's by means of silencing anything playing in a particular square.
The sound is a bit of an issue though... we really need a way to stop a looping sound. even if it's by means of silencing anything playing in a particular square.
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: (Object Assets) Empty Catacomb as Alcove and other alcov
I asked for it already in the editor requests thread but more people should request it then maybe we'll get it.Grimwold wrote:This is great. I must've read past those getFuel and setFuel commands a few times and not noticed.
The sound is a bit of an issue though... we really need a way to stop a looping sound. even if it's by means of silencing anything playing in a particular square.