Torch activation help please (solution found)
Re: Torch activation help please
Neikun have you tried doing what Montis has suggested yet?
I had the same problem with torches not having a reaction when removed > viewtopic.php?f=14&t=3099&start=30#p32633
I then changed the Torchholders activation from on Activate to Any. That resolved it. The sample I give there should be adaptable to work with pits instead of doors but I'll see if I can recreate this in a sample dungeon and If I can I'll drop the code here.
Right, how many Pits are we talking here? Because as Montis said in his post, you can ever so easily rig up a Pit that opens and closes via a torch by literally just setting the Torch Connector to
"ANY > dungeon_pit_1 > Toggle"
I had the same problem with torches not having a reaction when removed > viewtopic.php?f=14&t=3099&start=30#p32633
I then changed the Torchholders activation from on Activate to Any. That resolved it. The sample I give there should be adaptable to work with pits instead of doors but I'll see if I can recreate this in a sample dungeon and If I can I'll drop the code here.
Right, how many Pits are we talking here? Because as Montis said in his post, you can ever so easily rig up a Pit that opens and closes via a torch by literally just setting the Torch Connector to
"ANY > dungeon_pit_1 > Toggle"
Last edited by Xzalander on Wed Sep 19, 2012 11:49 pm, edited 1 time in total.
Re: Torch activation help please
That code bit confuses me, and I don't really see where or how to set activation to any.
If you could explain it specific to this code, I might be able to pick up on it, I think.
Thank you.
One pit per torch holder.
If you could explain it specific to this code, I might be able to pick up on it, I think.
Thank you.
One pit per torch holder.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: Torch activation help please
You dont need to code it.
Click the Torch holder, link it to the pit. On the torch holder once linked will have a drop down box under Event with the options Activate, Deactivate and Any.
Click the Torch holder, link it to the pit. On the torch holder once linked will have a drop down box under Event with the options Activate, Deactivate and Any.
Re: Torch activation help please
Oh my god. oh my god I feel so silly!
I did not realize there was a drop down menu there!
*hides head in dirt*
Oh I'm so foolish
lol
Thank you.
Edit: Tested, success. Oh how the sound of pits opening has never sounded so sweet.
Hey! this fixes my issue with levers too, Where I'd flip the lever, then hafta flip it up to reset it if I wanted to flip it again.
I did not realize there was a drop down menu there!
*hides head in dirt*
Oh I'm so foolish
lol
Thank you.
Edit: Tested, success. Oh how the sound of pits opening has never sounded so sweet.
Hey! this fixes my issue with levers too, Where I'd flip the lever, then hafta flip it up to reset it if I wanted to flip it again.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: Torch activation help please
Neikun;
Incase you ever have a need to script it:
You still need to set the torch holder to any, but using that above you can tie multiple torches to a single pit (as per the Combination Torch Lock).
Also you can reverse the open / close states and obviously you'd need to rename the torch_holder and dungeon_pit entries.
Also youll be able to specify multiple pits and torches at once in a single script, so it would save you leg work in the long run with all those connections.
Incase you ever have a need to script it:
Code: Select all
function torchpit()
if torch_holder_30:hasTorch() == true then
dungeon_pit_13:open()
else
dungeon_pit_13:close()
end end
Also you can reverse the open / close states and obviously you'd need to rename the torch_holder and dungeon_pit entries.
Also youll be able to specify multiple pits and torches at once in a single script, so it would save you leg work in the long run with all those connections.
Re: Torch activation help please
Thank you very much. You've been most helpful.
Truth be told when Montis said set activation any
I was like "WAHT THAT EVEN IS?"
Truth be told when Montis said set activation any
I was like "WAHT THAT EVEN IS?"
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: Torch activation help please (solution found)
I am trying to figure out torches combination for secret door opening. Trying it out with 2 holders just for a test. I'm nost sure if i followed correctly but i cannot achieve desired result.
So i have following :
dungeon_secret_door_1
torch_holder_5
torch_holder_6
script_entity_1
Script has this :
I placed connectors from holders to door. That leads to door being open upon first torch placed into holder.
When i place connectors from holders to the script object, door won't even open.
What am i doing wrong here?
So i have following :
dungeon_secret_door_1
torch_holder_5
torch_holder_6
script_entity_1
Script has this :
Code: Select all
function torches1 ()
if torch_holder_6:hasTorch () == true and
torch_holder_5:hasTorch () == true then
if dungeon_secret_door_1:isClosed () then
dungeon_secret_door_1:open()
else dungeon_secret_door_1:close()
end
end
end
When i place connectors from holders to the script object, door won't even open.
What am i doing wrong here?
Re: Torch activation help please (solution found)
first thing, don't have a space before all the (), so it should be torches1() for example, and the other ones too. Also, no need to check whether the door it closed before opening it, just send the open command. Also, you can leave off the == true if you want.
be sure to connect both torches to the script with Event "any"
Code: Select all
function torches1()
if torch_holder_6:hasTorch() and
torch_holder_5:hasTorch() then
dungeon_secret_door_1:open()
else
dungeon_secret_door_1:close()
end
end
Finished Dungeons - complete mods to play
Re: Torch activation help please (solution found)
Yes it's spaces before the ()... How stupid is that. I am returning here to edit the post and finding your answer same time
When you take my original code and just fix the spaces the script works. But door won't close when you remove the torch. So i removed the check for closed door and now it works how it should.
Corrected code is here :
When you take my original code and just fix the spaces the script works. But door won't close when you remove the torch. So i removed the check for closed door and now it works how it should.
Corrected code is here :
Code: Select all
function torches1()
if torch_holder_6:hasTorch() == true and
torch_holder_5:hasTorch() == true then
dungeon_secret_door_1:open()
else dungeon_secret_door_1:close()
end
end
Re: Torch activation help please (solution found)
wasn't sure if someone answered you but..
== means "is equal to"
where = means "this IS this" ( usually used for assigning a variable ).
== means "is equal to"
where = means "this IS this" ( usually used for assigning a variable ).