I would like to spawn two torches inside empty torch holders when a pressure plate is pressed ,
and another script for checking if those two torches are placed in two other torch holders,
also i'd like to know how to make an altar accept a dagger for triggering an event..........
help with scripting needed!
Re: help with scripting needed!
TorchHolder:addTorch()
Shortcut for “TorchHolder:addItem(spawn(“torch”))”.
just link the pressure plate to a script with the above code for both torchholders, such as:
You can just connect the other two empty torch holders to a counter (set to 2), and connect the counter to whatever you want to happen. This will only be effective if the player doesn't have access to any other torches
I haven't played with Alters yet, but it sounds pretty straightforward
Shortcut for “TorchHolder:addItem(spawn(“torch”))”.
just link the pressure plate to a script with the above code for both torchholders, such as:
Code: Select all
function lightitup()
torchholder1:addTorch()
torchholder2:addTorch()
end
I haven't played with Alters yet, but it sounds pretty straightforward
Finished Dungeons - complete mods to play
Re: help with scripting needed!
That was very helpfull for me!
thanks
thanks
Re: help with scripting needed!
spawning torches inside empty torch holders works like you said: “TorchHolder:addItem(spawn(“torch”))”.
now this:
ok i have this in the objects file :
and this in the items file:
now how do i set the torch holder to trigger an event if a sacrificial torch is placed in it?
now this:
ok i have this in the objects file :
SpoilerShow
cloneObject{
name = "sacrificial_torch_holder",
baseObject = "torch_holder",
}
name = "sacrificial_torch_holder",
baseObject = "torch_holder",
}
SpoilerShow
cloneObject{
name = "sacrificial_torch",
baseObject = "torch_everburning",
uiName = "sacrificial_torch",
attackPower = 8,
damageType = "fire",
description = "This Torch is rapped in bandages, its fire seems brighter.",
}
name = "sacrificial_torch",
baseObject = "torch_everburning",
uiName = "sacrificial_torch",
attackPower = 8,
damageType = "fire",
description = "This Torch is rapped in bandages, its fire seems brighter.",
}
Re: help with scripting needed!
I don't know how that would be done, hopefully someone smarter than me can help! It's certainly not currently as easy as dealing with alcoves and altars which are designed to hold a variety of objects.
So this might be a case of asking for a new feature in the editor, to make torchholders more like alcoves, able to detect what item is in them, etc.
So this might be a case of asking for a new feature in the editor, to make torchholders more like alcoves, able to detect what item is in them, etc.
Finished Dungeons - complete mods to play