Making Custom Torch?
Posted: Mon Apr 21, 2014 12:21 pm
I have started to create a mod. I have a little experience of scripting, but i still get confused how the ingame systems are sets.
I have made four custom torches. And they work fine. The problem is the torch holder.
I made a custom torch holder cloning the alcove and that worket, but the torch doesn't light up
That could work with my torches, because they are not exactly ment to give much light, more of
a soul binding torch or something like that
I intendent to use them in puzzles with basic puzzles
and monster puzzles. No not a moster soul binding torches
or... hmm... That would be interest
too, to steal the lifespam to torches by hitting enemys
Light up my torch
Whoop, whoop... 
But still what i would want to do, would have a dimmer custom torch with my graphics. I actyally modelled and
have the torches different look in the game already
So the torces is'nt the proplem at all...
Torch holder doesn't have the "onInsertItem" hook. So here is what i did with the alcove.
And here is one of my torches...
Anyone know how to make a custom torches which would light up in the torch holder, but would not take a regular torch. And to modify the regular torch holder not to take custom torches?
I have made four custom torches. And they work fine. The problem is the torch holder.
I made a custom torch holder cloning the alcove and that worket, but the torch doesn't light up
That could work with my torches, because they are not exactly ment to give much light, more of
a soul binding torch or something like that
and monster puzzles. No not a moster soul binding torches
too, to steal the lifespam to torches by hitting enemys
But still what i would want to do, would have a dimmer custom torch with my graphics. I actyally modelled and
have the torches different look in the game already
Torch holder doesn't have the "onInsertItem" hook. So here is what i did with the alcove.
Code: Select all
cloneObject{
name = "sacrament_torch_holder",
baseObject = "eye_socket_left",
model = "mod_assets/models/jp_sacrament_torch_holder.fbx",
anchorPos = vec(0.05, 1.53, -0.25),
anchorRotation = vec(0, -20, -90),
targetPos = vec(0.00, 1.53, -0.25),
targetSize = vec(0.2, 0.4, 0.2),
placement = "wall",
replacesWall = false,
onInsertItem = function(self, item)
return item.name == "sacrament_torch_5" and item:setFuel(5) and self:getItemCount() == 0 or
item.name == "sacrament_torch_15" and item:setFuel(15) and self:getItemCount() == 0 or
item.name == "sacrament_torch_30" and item:setFuel(30) and self:getItemCount() == 0
end,
editorIcon = 92,
Code: Select all
cloneObject{
name = "sacrament_torch_15",
baseObject = "torch",
uiName = "Sacrament torch",
model = "mod_assets/models/JP_item_sacrament_torch_Grimrock.fbx",
description = "These torches doesn't light up, or emit warmth at all. They are to bind souls from other sides. They need altar to work. This have the mark of ******",
fuel = 15,
weight = 5.3,
}