Page 1 of 1

[Help Me!] Simple 2 Torch Puzzle

Posted: Mon Sep 24, 2012 11:55 am
by arnquist
How can I make a torch puzzle with 2 torch holders that requires one torch holder with a torch while the other one MUST be empty? Sorry for asking such a newb question, I stink at coding.

Re: [Help Me!] Simple 2 Torch Puzzle

Posted: Mon Sep 24, 2012 12:13 pm
by Montis
You don't actually need any coding for this.

You might want to read the "Getting Started" parts of the modding documentation and watch Komag's video tutorials, most everything basic is explained there.

I will give you the following hints, you should be able to figure out the rest
  • you need 2 torchholders and a counter
  • both torchholders have to be connected to the counter twice, once for increment, once for decrement
  • the counter has to be connected to whatever you want to do (probably open a door)
  • a counter "activates" when it reaches 0
  • a torchholder "activates" when you put a torch in it, and "deactivates" when you remove it

Re: [Help Me!] Simple 2 Torch Puzzle

Posted: Mon Sep 24, 2012 12:17 pm
by Komag
You can do it mostly the way I show in my video:
6: Scripts Counters Activate Decrement Print
you would just switch the activate/deactivate of the one you want empty.

also it depends on how you start the puzzle.

if you start it "reversed", where the one that must be empty has a torch and the one that must have a torch is empty, then just set the counter to 2, link the empty torch holder with "activate-decrement, deactivate-increment" and link the filled torch holder with "deactivate-decrement, activate-increment"

if you start with both torch holders empty, then set the counter to 1, link the correct torch holder with "activate-decrement, deactivate-increment", and link the wrong torch holder with "activate-increment, deactivate-decrement"