User Tools

Site Tools


dromed:odometer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dromed:odometer [2010/01/18 19:51]
r_soul created
dromed:odometer [2019/04/09 18:15] (current)
r_soul
Line 3: Line 3:
 :T2: :T2:
  
-NOTEME ​This is a modification of a Dromed Central tutorial.+:!: This is a modification of a Dromed Central tutorial.
  
 First, create several items: First, create several items:
Line 16: Line 16:
   - Add the property ``Trap``->​``QuestVar`` to the ``Odometer`` and give it the argument ``door_combo``\\   - Add the property ``Trap``->​``QuestVar`` to the ``Odometer`` and give it the argument ``door_combo``\\
   - Do the same for the ``NumberButton``\\   - Do the same for the ``NumberButton``\\
-  - Add the property ``Shape``->​``TxtRepl r0`` to the ``NumberButton``. The argument for this is ``obj\txt\button0``+  - Add the property ``Shape``->​``TxtRepl r0`` to the ``NumberButton``. The argument for this is ``obj\txt16\button0``
   - To make the rest of your buttons, clone this one and change the ``TxtRepl r0`` argument to ``button1``,​ ``button2``,​ ``button3``,​ etc.   - To make the rest of your buttons, clone this one and change the ``TxtRepl r0`` argument to ``button1``,​ ``button2``,​ ``button3``,​ etc.
   - Add the property ``Trap``->​``QuestVar`` to the ``QuestVarTrigger`` and give it the argument ``"​1138:​door_combo`` (YES, a QUOTE goes to the beginning but not the end! Kinda like cheap French literature.)   - Add the property ``Trap``->​``QuestVar`` to the ``QuestVarTrigger`` and give it the argument ``"​1138:​door_combo`` (YES, a QUOTE goes to the beginning but not the end! Kinda like cheap French literature.)
Line 22: Line 22:
     * The ``"`` means that the quest variable ``door_combo`` should //end// with 1138, which allows for the player trying other numbers beforehand.     * The ``"`` means that the quest variable ``door_combo`` should //end// with 1138, which allows for the player trying other numbers beforehand.
   - Add a ``ControlDevice`` link from the ``QuestVarTrigger`` to the item you want to control with the code.   - Add a ``ControlDevice`` link from the ``QuestVarTrigger`` to the item you want to control with the code.
 +  - Type the command ``quest_create_mis door_combo, 0``
 +    * This is optional - it will reset the code to 0000 when you exit game mode. If you don't do it, the odometer will display the most recent value of ``door_combo`` until you close Dromed.
  
 The combination lock should now be fully functional. The combination lock should now be fully functional.
  
-NOTEME ​You will notice there are no ``ControlDevice`` links between the ``NumberButtons`` and the ``Odometer``. This is because the buttons inherit the ``NumberButton`` script from the hierarchy, and that script looks at the texture to work out which number has been entered.+:!: You will notice there are no ``ControlDevice`` links between the ``NumberButtons`` and the ``Odometer``. This is because the buttons inherit the ``NumberButton`` script from the hierarchy, and that script looks at the texture to work out which number has been entered.
  
-If you want to have multiple independent combination locks, do the above steps again but replace ​``door_combo`` ​with anything ​else.+If you want to have multiple independent combination locks, do the above steps again but instead of typing ​``door_combo``, type something ​else (``door_combo`` is just a variable name, there'​s nothing special about it).
dromed/odometer.1263844273.txt.gz · Last modified: 2010/01/18 19:51 by r_soul