I'm creating my tribute to Dungeonquest Board Game, and i need a script to to light off the torch in a special room (3x3). And, in the script, the door will cloose untill the player light another torch. Is it possible?
And another script i need can be a small percentage on each step to burn more quickly the torches (the light's duration will decrease). This must be applied on the entire 32x32 dungeon level.
[HELP] I need a script for the Torch to goes off
[HELP] I need a script for the Torch to goes off
If we do not end the war, the war will end us.
Re: [HELP] I need a script for the Torch to goes off
Adding a torch to a holder is easy:
Removing a torch from a holder seems to be a bit trickier. The best I can come up with actually destroys ALL torches at the cell that the torch holder is at, including ones that are on the ground:
As for the second part, are you talking about making torches on the walls dim after each step? I think you might be in for a bit of work for that, because I don't think that torches on the walls can be dimmed like torches that are held. I've only seen them be full brightness or burnt out when on the wall.
You might be able to pull it off by duplicating torches and torch holders, and creating/destroying lights based on torch fuel level.
Code: Select all
function AddTorch()
torchHolder:addTorch()
end
Code: Select all
function RemoveTorch(torchHolder)
for e in entitiesAt(torchHolder.level, torchHolder.x, torchHolder.y) do
if e.name == "torch" then
e:destroy()
end
end
end
You might be able to pull it off by duplicating torches and torch holders, and creating/destroying lights based on torch fuel level.
Re: [HELP] I need a script for the Torch to goes off
You could use a similar script to reduce their fuel such as setFuel(100) but that will only have an effect once you pick them up and use them - in the torchholders they will last forever and be just as bright
Finished Dungeons - complete mods to play
