Trying to reposition a torch to correspond with it's torch holder in +/- z axis. I can move the torch holder up, or down, but for the life of me I can't figure out once I have the holder in postion at -3 or +3 in "z" to add a lit torch that matches the holders location. How does the interaction with the torch holder and the "add torch" script work? Is this possible or should I just use another light source? Thx!
-Paul
Move torch w/holder in "Z" axis w/ GMT?
Move torch w/holder in "Z" axis w/ GMT?
Last edited by Paul on Thu Apr 18, 2013 11:16 pm, edited 1 time in total.
Re: Move torch w/holder in "Z" axis w/ GMT?
I hacked it by using a fake light and a burned out torch, IIRC (I'm starting to forget the details). You can see the setup in the tomb section of Master Quest in the source files (although that section is pretty complex, might be hard to tell what's going on)
Finished Dungeons - complete mods to play
Re: Move torch w/holder in "Z" axis w/ GMT?
I do like that :
In GMT, take the torch holder model's and translate 3 in Z axe.
Place your torch_holder_up without adding torch.
and in a script :
Code: Select all
defineObject{
name = "torch_holder_up",
class = "TorchHolder",
model = "mod_assets/models/torch_holder_up.fbx",
anchorPos = vec(0.05, 4.53, -0.25),
anchorRotation = vec(0, -20, -90),
placement = "wall",
editorIcon = 84,
}Code: Select all
defineObject{
name = "torch_light_up",
class = "LightSource",
lightPosition = vec(0, 4.8, 1.1),
lightRange = 10,
lightColor = vec(1, 0.5, 0.25),
brightness = 11,
castShadow = true,
particleSystem = "torch",
placement = "floor",
editorIcon = 88,
}and in a script :
Code: Select all
local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(0)
torch_holder_up_1:addItem(mytorch)Orwak - MOD - Beta version 1.0
Re: Move torch w/holder in "Z" axis w/ GMT?
In my tests I found that positioning at 1.85 above ground is a bit more precise. So I would suggest (0, 4.85, 1.1).Damonya wrote: lightPosition = vec(0, 4.8, 1.1),
[/code]
I wonder, is the light position rotating if you rotate the light source object?
Re: Move torch w/holder in "Z" axis w/ GMT?
Yes.Diarmuid wrote: I wonder, is the light position rotating if you rotate the light source object?
The difference is really unnoticeableIn my tests I found that positioning at 1.85 above ground is a bit more precise. So I would suggest (0, 4.85, 1.1).]
Otherwise I think Komag adds a "radiant light" around the torch_holder_up, in his mod, but it's not compulsory.
And with this method, this is also effective to turn off a torch (simply disable-enable the torch_light). With a real item torch this is more complex.
Orwak - MOD - Beta version 1.0
