TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 8 of 8

Thread: Connecting 2 odometers using a requireall trap ?

  1. #1
    Summer Vacation Contest Winner 2010
    Registered: Sep 2003
    Location: PacificNorthWest...Near Forks

    Connecting 2 odometers using a requireall trap ?

    I am studying shipping/receiving now to learn more about the use of odometers. I have used them in some of my missions, but only 1 at a time. I know how to have multiple odometers for different doors, as I have done it, but I need a special use for having 8 code numbers needed to unlock something.

    Is it possible to connect 2 odometers to a requireall trap, so that 8 numbers are required to send 1 turn on ? Like door_combo1 door_combo2 ? The problem being is that once 4 correct numbers are entered into the odometer, resetting the first odometer sends a turnoff. Using trapcontrol flags doesn't seem to work.

    anotherwards: qvartrig1, and qvartrig2 >requirealltrap>TurnOn. But, what I am after is for odometer1 to retain the entered numbers, and then to allow for odometer2 to be used to complete all 8 numbers needed to send 1 turnon, and so the odometers do not reset themselves back to zero.

    Would some NV Script help here at all ?

    Anyone ever accomplished it ?
    Last edited by darthsLair; 20th Aug 2012 at 00:38.

  2. #2
    Registered: Jan 2006
    Location: On the tip of your tongue.
    Do you need it to be displayed on the odometer? Because if not, you can just set up one odometer with an 8-digit code. That works fine, I've done it in 3 missions I think. If you need the eight-digit code to be displayed, I'm not so sure.

  3. #3
    Summer Vacation Contest Winner 2010
    Registered: Sep 2003
    Location: PacificNorthWest...Near Forks
    Quote Originally Posted by nicked View Post
    Do you need it to be displayed on the odometer? Because if not, you can just set up one odometer with an 8-digit code. That works fine, I've done it in 3 missions I think. If you need the eight-digit code to be displayed, I'm not so sure.
    Thanks Nicked, I didn't know that: "02456973:door_combo The odometer will change by just adding more numbers to the questvar Trigger ? I could always make a dummy odometer, and just teleport it in, once the correct code is entered. Can you tell me how to configure an odometer for 8 numbers ? Thanks again !

  4. #4
    Registered: Jan 2007
    Location: Germany
    I've got an idea how to fake an 8-digit code by using two odometers which share the same buttons if this is of any help:

    - place two odometers right next to each other, overlapping if possible
    - assign a distinct qvar to each odometer, e.g. Qvar1 and Qvar2
    - create two MetaProperties, one "IncreaseQVar1", the other "IncreaseQVar2"
    - "IncreaseQVar1" gets "Trap -> QVar: Qvar1"
    - "IncreaseQVar2" gets "Trap -> QVar: Qvar2"
    - create all nine number buttons and add the metaproperty "IncreaseQVar1" to them
    - create another qvar "counter" and initialize it with "0"
    - create a new qvar trap, "IncreaseCounter", and make it increase "counter" by one
    - link each number button to "IncreaseCounter"
    - create a qvar trigger "Counter4" which fires when the variable "counter" reached the value "4"
    - use this trigger to start a conversation that removes "IncreaseQVar1" from all buttons and adds "IncreaseQVar2" instead
    - create another qvar trigger "Counter8" which fires when the variable "counter" reaches the value "8"
    - use this trigger to start a conversation exchanging the metaproperties again and to reset the qvar "counter" to "0"

    The following should happen:
    - you press the buttons and the first odometer changes according to the input
    - once you've pressed five buttons in total, the second odemeter will change and the first remains unchanged
    - if you press the ninth button in total, the first odometer should change again while the second one remains unchanged

  5. #5
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    gen.osm 2

    Controls the joints of the Odometer object. The object has four joint tweqs corresponding to four decimal digits. The joints will be tweqed to match the value of the quest variable specified in Trap\Quest Var. Each joint is tweqed individually, from 1 to 4. When the script receives TweqComplete, a schema is played and the next joint is tweqed. If the number displayed is a valid code for the device, the schema object digisuc is played; otherwise, it is the object digiclk. Valid codes are specified by a ScriptParams link with data CodeRelay to exactly one "code relay" object. The code relay has ScriptParams links with data CodeRelay to any number of objects that have a Trap\Quest Var property in the format of TrigQVar. The name of the quest variable in the target Trap\Quest Var property must match the variable that the odometer looks for, and the number must be exactly four digits. The objects do not necessarily have to be triggers.

    The operator of a quest variable trigger is ignored and it will play digisuc even if the trigger would be off. It also only considers the four least-significant digits of the quest variable. The "digit-match" operator (") for TrigQVar makes the trigger behave the same way as the odometer.
    The problem I see with the above is the sounds played. Also, it seems that according to the documentation a single odometer will only care about "the four least-significant digits" so an 8 digit code is not supported.

    My question is why? Why do you need an 8 digit code? Players have enough trouble with 4 digits. Is there really a valid game play reason for this, or do you just want to make it extra hard? If the latter I suggest that you don't go down that road. What does eight digits get you in game play that four digits doesn't?

  6. #6
    Summer Vacation Contest Winner 2010
    Registered: Sep 2003
    Location: PacificNorthWest...Near Forks
    Thanks Intruder, that sounds like a plan. Your formula looks like it would work okay. I can set up a couple dummy odometers, no problem for the post entered effect.

    Thanks Larry, I know what you mean.
    My original Idea was a cryptex. The numbers converted to letters to spell a name. With 4 numbers, how many actual names can you spell ? It would be very hard, yes, and that is the point for expert difficulty, but it would be an optional objective. If they couldn't cut the mustard, then they could pass, and still win the mission. I dont commonly use puzzles in my missions. I had a reasonalby easy puzzle set up in WWWW, but only a few actually solved it. Personally, I hate to have to solve a puzzle in a game, because I think it breaks immersion.

    The big problem I have found in games is readables. No one seems to be interested in putting mental effort into solving clues and such, so I have been working on some simple symbolic systems that register in the brain, and can easily be deciphered. No readables needed, but I would need some test subjects for that experiment. I wouldn't want to create a diversion from the story line. To become so immersed in solving puzzles would destroy the point in winning the game. I feel that game play is number 1 in a successful win.

    Let the games begin ~

  7. #7
    Registered: Jul 2002
    Location: Ames, IA, USA
    Your question reminded me that I've tried to figure this out a few times before without luck, and your mention of NVScripts got me thinking again about how to get this done. After a bit of fiddling around, I have something worked out that's fairly simple.

    I know you already know how to do a basic setup, but I'm going to include everything (except positioning instructions) just in case someone else tries this who has been following one of the old tutorials which create a lot of unnecessary additional objects.

    First, create a number button. Change the Shape\TxtReplr0 to obj\txt\button0 and add Trap\Quest Var Combo1 (or whatever you want to call it). Then create another nine buttons, changing the Shape\TxtReplr0 to obj\txt\button1, obj\txt\button2 up through obj\txt\button9.

    Second, create a QuestVarTrigger and add Trap\Quest Var "12345678:Combo1 (or whatever combination you want). Add a ControlDevice link to the door you want to open.

    At this point, the combination lock should work just as expected, even without the odometer.

    Third, create an odometer and add Trap\Quest Var Combo1. This changes nothing except that now you'll be able to see the last four digits entered on the readout.

    Fourth, create a second odometer and change the Trap\Quest Var to Combo2 (or whatever).

    Fifth, create a marker and add Script NVTrigQVar and Editor\Design Note NVTrigQVarAllowRepeats=1 to the marker. Next add Trap\Quest Var >9999:Combo1 so it will trigger when a fifth digit is entered. For ease of reference, let's call this marker Overflow.

    Sixth, create another marker and add Script NVTrapSetQVar and Trap\Quest Var =Combo1:Combo2 to the marker, then add a ControlDevice link from Overflow.

    Seventh, create another marker and add Script NVRelayTrap and Editor\Design Note NVRelayTrapDelay=10 to the marker, then add a Control Device link from Overflow.

    Lastly, create a TrapSetQVar and add Trap\Quest Var /10000:Combo2 and add a ControlDevice link from the marker made in step 7.

    Now here's how this works: Once the fifth digit is entered, Combo2 is first set to the current value of Combo1, and then after 10 milliseconds, that value is divided by 10000, which cuts off the last four digits. The result is displayed on the second odometer.

    The delay ensures you are dividing the current Combo1 value rather than the previous value of Combo2. You could just use a plain TrapRelay with no delay, but I'm not sure that would always work on all machines.

    As to why you need the NVScripts: They allow for repeated firing of the trigger and for setting one variable value to another.

    Note: Once you have everything set up, you may find that the odometers start out with some random value entered. If that doesn't bother you, fine; but if it does, open the Quest Data box and change the values for your combinations to zero.

  8. #8
    Summer Vacation Contest Winner 2010
    Registered: Sep 2003
    Location: PacificNorthWest...Near Forks
    Wow ! Thankyou Catman, I will get on this and try it. one little cryptex type puzzle wont really harm anyone who likes puzzles.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts