Torches (Dim)
- King Semos
- Posts: 123
- Joined: Sun Apr 15, 2012 6:05 pm
Torches (Dim)
Anyone know how to spawn torches that are dim. I don't want there to be too much light, so I was wondering if it is possible to create new torches that are almost extinguished?
Re: Torches (Dim)
local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
mytorch:setFuel(30)
Re: Torches (Dim)
can this be done with torches in the torch holder aswell?
Printable Spell Sheet.pdf *spoiler*
Re: Torches (Dim)
I haven't heard of a way to have dim torchlight, but maybe a custom object could do it, not sure. You could certainly place dim lighting in the area that is not torches, just low colored fx lights
Finished Dungeons - complete mods to play
Re: Torches (Dim)
If it's an empty torch holder, try:war_dog wrote:can this be done with torches in the torch holder aswell?
local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
myholder:addItem(mytorch)
if it isn't empty then things get complicated and I don't have an answer right now...
-
- Posts: 35
- Joined: Fri Jun 15, 2012 7:31 am
- Location: Germany
Re: Torches (Dim)
The definition of how the torchlight is shown is found in the standart asset packet in the subfolder assets/particles/torch.lua ... maybe overwrite it?
Good luck
Good luck

- King Semos
- Posts: 123
- Joined: Sun Apr 15, 2012 6:05 pm
Re: Torches (Dim)
Where am I supposed to put this?Decayer wrote:local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
Is this lua scripting in the editor, or in the dungeon files?
Re: Torches (Dim)
It's Lua, however you could also do this:King Semos wrote:Where am I supposed to put this?Decayer wrote:local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
Is this lua scripting in the editor, or in the dungeon files?
Code: Select all
cloneObject{
name = "torch_dim",
baseObject = "torch",
fuel = 30,
}
Edit: I might be misunderstanding you; this torch only has a shorter duration, it isn't actually dimmer.
- King Semos
- Posts: 123
- Joined: Sun Apr 15, 2012 6:05 pm
Re: Torches (Dim)
Thanks.Decayer wrote:It's Lua, however you could also do this:King Semos wrote:Where am I supposed to put this?Decayer wrote:local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
Is this lua scripting in the editor, or in the dungeon files?to create a torch that only lasts for 30 seconds. Copy + paste that into items.lua and reload the project and you should see torch_dim in the list of items.Code: Select all
cloneObject{ name = "torch_dim", baseObject = "torch", fuel = 30, }
Edit: I might be misunderstanding you; this torch only has a shorter duration, it isn't actually dimmer.
The torch itself is bright yea, it dims about 5 seconds before it extinguishes. I guess the given fuel level doesn't determine if its bright or dim, probably only when it reaches a % of its base fuel level.
Though this is still useful, I think I could use some short duration torches.
Re: Torches (Dim)
Standard torch starts @ 1100 seconds.
First dim is ~308 seconds.
Second dim is ~28 seconds.
May be missing a step but I did a fairly thorough testing.
edit: the way to have the torch start as dim is to do what Decayer posted and use setFuel() in a script entity (in editor). If you create a torch low fuel object in the lua file, it works on a % basis as you found out.
First dim is ~308 seconds.
Second dim is ~28 seconds.
May be missing a step but I did a fairly thorough testing.
edit: the way to have the torch start as dim is to do what Decayer posted and use setFuel() in a script entity (in editor). If you create a torch low fuel object in the lua file, it works on a % basis as you found out.