Psych0sis on 10/11/2018 at 14:39
I have an idea for my mission where there are 7 switches, each corresponding to a letter which will spell out a word, and make the objective lootable.
First letter/lever will always be switched down no matter what, to make it a bit more forgiving in formulating the word. If a lever is pulled out of order, all will reset (besides the always down one) and you have to start over. How can I achieve this exactly? I assume a ton of linking, but I'm not sure how to make them reset nor how to give them a specific order for succession.
Unna Oertdottir on 10/11/2018 at 15:09
You want a switch reset?
Set up a S&R system
Receptron-->Tweq Control
TypeTweq: Joints
Action: DoReset
vfig on 10/11/2018 at 15:19
Quote Posted by Psych0sis
I have an idea for my mission where there are 7 switches, each corresponding to a letter which will spell out a word, and make the objective lootable.
This sounds very similar in structure to a puzzle in my mission, which is driven by a custom Squirrel script I wrote. (I did briefly attempt to make it work through just links and traps, but it became much too unwieldy). I'm happy to share my script and help you adapt it to your needs if you'd like.
Psych0sis on 11/11/2018 at 09:33
Oops, sorry. I wrote this thread before going to bed.
Quote Posted by Unna Oertdottir
You want a switch reset?
Set up a S&R system
Receptron-->Tweq Control
TypeTweq: Joints
Action: DoReset
Well alright, this does set up the reset functionality. But I'm still confused on how I can set up a specific order.
Quote Posted by vfig
This sounds very similar in structure to a puzzle in my mission, which is driven by a custom Squirrel script I wrote. (I did briefly attempt to make it work through just links and traps, but it became much too unwieldy). I'm happy to share my script and help you adapt it to your needs if you'd like.
I'm not entirely sure if custom scripts are allowed for the Anniversary Contest, which is what I'm /hoping/ to finish this in time for (this is the last thing needed before beta testing!). Though if it is, I'd definitely be interested in getting it set up :D.
I was also thinking I could just do a basic switch puzzle, where some switches control others (probably the 2 next to them on each side) and you just have to find the right order to get them all facing down, which would be a pita to sett up admittedly in terms of logic, but probably not engine wise.
vfig on 11/11/2018 at 12:27
Quote Posted by Psych0sis
I'm not entirely sure if custom scripts are allowed for the Anniversary Contest, which is what I'm /hoping/ to finish this in time for (this is the last thing needed before beta testing!). Though if it is, I'd definitely be interested in getting it set up :D.
I think it's pretty unambiguous there:
Contestants can use custom scripts (NVScript, Squirrel, etc).Here's my puzzle script, with irrelevant stuff cut out and the reset behaviour changed according to your description: (
https://drive.google.com/open?id=1eyqvBkBp5SCizJG8X-Nm_EpPygb2K41b) Download from Google Drive. Open magicword.nut in Notepad or whatever, cause the comment at the top describes how to hook it up.
I've included a demo .mis (built in Thief Gold, NewDark 1.26) showing it all hooked up, but it's not complicated. The demo uses numbers instead of letters only because the number models were convenient for labelling the levers: letters will work fine too. The magic word in the demo is 3142.
Caveats:
If your magic word uses, for example, the letter T twice, you will need two levers for T, as the puzzle will reset if the player turns off a lever; but it won't matter which T lever the player uses first and which they use second. Alternatively, use buttons for the puzzle instead of levers, because buttons don't get "turned off", so a single T button can be pushed repeatedly.
The puzzle doesn't understand case, and will treat "a" and "A" as different: just use all uppercase (or all lowercase) when setting up the puzzle; don't mix case.
If you use numbers instead of letters, the magic word can't start with a zero, because the Design Note parsing ignores it (unfortunately).
If you wanted, each lever could be a string of letters instead of a single letter. The puzzle just adds the data for each lever onto the end of the player's guess so far, then compares it to the solution.
Psych0sis on 11/11/2018 at 21:27
Quote Posted by vfig
I think it's pretty unambiguous there:
Contestants can use custom scripts (NVScript, Squirrel, etc).Here's my puzzle script, with irrelevant stuff cut out and the reset behaviour changed according to your description: (
https://drive.google.com/open?id=1eyqvBkBp5SCizJG8X-Nm_EpPygb2K41b) Download from Google Drive. Open magicword.nut in Notepad or whatever, cause the comment at the top describes how to hook it up.
I've included a demo .mis (built in Thief Gold, NewDark 1.26) showing it all hooked up, but it's not complicated. The demo uses numbers instead of letters only because the number models were convenient for labelling the levers: letters will work fine too. The magic word in the demo is 3142.
Caveats:
If your magic word uses, for example, the letter T twice, you will need two levers for T, as the puzzle will reset if the player turns off a lever; but it won't matter which T lever the player uses first and which they use second. Alternatively, use buttons for the puzzle instead of levers, because buttons don't get "turned off", so a single T button can be pushed repeatedly.
The puzzle doesn't understand case, and will treat "a" and "A" as different: just use all uppercase (or all lowercase) when setting up the puzzle; don't mix case.
If you use numbers instead of letters, the magic word can't start with a zero, because the Design Note parsing ignores it (unfortunately).
If you wanted, each lever could be a string of letters instead of a single letter. The puzzle just adds the data for each lever onto the end of the player's guess so far, then compares it to the solution.
Lol, perhaps I should read the thread more carefully :P. I always gloss over
something.
This works wonderfully, thank you!
Psych0sis on 11/11/2018 at 22:33
Quote Posted by Psych0sis
Lol, perhaps I should read the thread more carefully :P. I always gloss over
something.
This works wonderfully, thank you!
Spoke too soon again sorry! It all does work correctly, but when I get to the last step (linking the trapTrig to the object the switches are activating). I want them to deactivate a forcefield around the object so it can then be lootable.
If I purposely fail the puzzle, it gets rid of the forcefield, and if I succeed it, it puts the forcefield back up. It's sending "turn off" on failure then "turn on" on success, anyway to reverse this? :p
nightshifter on 11/11/2018 at 23:00
using an invertertrap??
Psych0sis on 11/11/2018 at 23:13
Quote Posted by nightshifter
using an invertertrap??
This... sort of works, but then it makes all the levers freeze in the UP position if you fail. I'm most definitely linking it wrong or something, apologies for constant mistakes :joke:
R Soul on 12/11/2018 at 00:08
Try this:
Open the .nut file in notepad. You'll see two functions: CompletePuzzle() and ResetPuzzle(). Swap the TurnOn/TurnOff messages each of them sends.