Complex Doors

This tutorial explains how to create secret doors and doors locked with keypads as in Shipping and Receiving.

FIRST, CHOOSE THE DOOR (SECRET, USUALLY) THAT YOU WANT TO USE. E.G.: USE COMMAND “FIND_OBJ 3X6SECRET-DOOR”.

THAN PLACE THE DOOR IN THE PROPER BRUSH. REMEMBER TO ALIGN WITH A WALL (OR FLOOR). MAKE SURE THE PLAYER CAN USE IT WITHOUT DIFFICULTIES. NOW,LET’S CHANGE SOME PROPERTIES.

FIRST, LET’S CHANGE A LOOK OF THIS DOOR. SELECT THE DOOR AND PRESS “PROPERTIES”. NOW ADD NEW PROPERTY “SHAPE->TXTREPL R0”. IN THE WINDOW TYPE THE PATH TO NEEDED TEXTURE, E.G. IF YOU WANTED TO USE TEXTURE “MWOOD02” FROM RESCOR_2 FAMILY, TYPE “FAM\RESCOR_2\MWOOD02” (FAM IS A RESOURCE FILE WHERE TEXTURES ARE STORED). IF YOU ARE USING “LIGHT_BRIGHT” YOU’LL SEE THE DOOR DARKER THAN A WALL. DON’T BE SCARED, THIS IS NORMAL.

SO WE HAVE A SECRET DOOR, BUT YOU STILL CAN OPEN IT EASILY. SO LET’S ADD SWITCH ENGINE TO OUR SECRET DOOR. CREATE TWO SWITCHES THAT YOU LIKE (THEY ARE UNDER “GIZMO->SWITCHES”) AND PLACE THEM ON BOTH SIDES OF THE DOOR ON THE WALL OR WHEREVER YOU LIKE. REMEMBER OR WRITE DOWN THE NUMBERS (IDS) OF SWITCHES AND THE DOOR. SELECT THE FIRST SWITCH (THIS ACTUALLY DOESN’T MATTER WHICH SWITCH IS FIRST) AND CLICK “LINKS” BUTTON. LINKS DIALOG WILL POPUP. CLICK “ADD” AND IN THE COMBO BOX “FLAVOR” FIND “CONTROLDEVICE” (ALWAYS USE WITHOUT A TILDE (~)), IN THE FIELD “FROM” ENTER THE NUMBER OF THIS SWITCH AND IN THE FIELD “TO” ENTER THE DOOR’S NUMBER. PRESS OK. BY DOING THIS YOU TELL TO SWITCH TO OPEN THE SELECTED DOOR. GO AHEAD. NOW SELECT THE SECOND SWITCH AND OPEN IT’S LINKS WINDOW. ADD NEW LINK: FLAVOR – “FROBPROXY”, FROM – THIS SWITCH NUMBER, TO – SECOND SWITCH NUMBER. NOW SELECT THIS LAST ADDED LINK AND CLICK ON “DATA” BUTTON. IN THE DIALOG CHOOSE “ALLOWDIRECT”. NOW RETURN TO DROMED. ACTUALLY, THE SECOND SWITCH DOESN’T OPEN THE DOOR, INSTEAD OF THIS IT SENDS A COMMAND TO FIRST SWITCH.

LET SEE WHAT WE HAVE FOR NOW. THE DOOR AND PAIR OF SWITCHES THAT CAN OPEN AND CLOSE IT. BUT STILL IF YOU’LL TRY TO OPEN THE DOOR MANUALLY, LIKE EVERY OTHER DOOR, YOU’LL SUCCESS. LET’S CHANGE THIS. GO TO PROPERTIES OF THE DOOR AND ADD NEW PROPERTY – “ENGINE FEATURES->FROBINFO”. OPEN IT AND REMOVE “SCRIPT” AND ADD “IGNORE” IN THE FIRST FIELD. RETURN TO DROMED. NOW ONLY THE SWITCHES CAN OPEN THE DOOR.

AND THE LAST THING. IF YOU WANT DOOR TO BE A ‘SECRET,’ DO FOLLOWING: GO TO PROPERTIES AND CLICK ADD>S>SCRIPTS WINDOW. PUT ‘TRACKHID’ IN THE FIRST FIELD, ‘TRIGDOOROPEN’ IN THE SECOND, MINUS THE QUOTES. MAKE SURE THAT ‘DONT INHERIT’ IS UNCHECKED. THAN ADD PROPERTY ‘DARK GAMESYS->STATS’ AND CHANGE IT TO ‘HIDDEN’.

MAKING CUSTOM SECRET DOORS

Secret door is a good object for secret doors. But you can make any object to act like a door. Let’s take for example a bed. Think you have a secret corridor under the floor and you want to make it secret and hidden, but don’t want to use a door. You want a bed instead it that simply moves aside when you switch some lever. So let’s make it.

I’m assuming that you already have a secret corridor and a hole in a floor that leads there. Now create a bed you like and place it over the hole. I took “A Bed-Victorian1”. Remember to align it with a floor.

Now open the bed’s properties and add “Door->Translating”. In the window change following fields:

-“Open position” to a width of the bed. You can find it under “Physics->Dimensions”. For my bed it was 5.

-“Base speed” to 2.00. This is the speed of moving. You can freely increase or decrease it.

-“Axis” to “X-axis”.

Add property “Engine Features->FrobInfo” and edit it. Change “World action” to “Ignore”. This will tell to game that you don’t want to open the door (bed here) like any other doors. Simply to ignore it. Remember that the only action must present.

Add “S->Scripts” and fill it with “StdDoor”.

So the bed-door (heheh) is ready to use. Let’s add a switch. Create switch object you like and edit it links. Add link “ControlDevice” with field “From” representing the number id of this switch and field “To” the number id of the bed’s door. That’s all, the secret bed’s door is ready to use. If you need add another switch as described in Secret Doors chapter.

And a last one. Our bed door has no sound so let’s add one of standards sounds. Add property “Schema->Class Tags” and enter “DoorType Slide1”. This will tell the game that our bed actually is a door and need to use a door’s sound. If you want to see other sounds, go to Object Hierarchy, find there “Doors” and check the schema property for all doors.

BACK TO TABLE OF CONTENTS

NUMBER CODE LOCK

Remember the second level of Thief II with code numbering device? Want to make one like this for your level? So what are we waiting for, let’s do it!

I’m asuming that you have a secret door already, so you need to create ten buttons (one for each number) and place them wherever you want. The button class is “physical->gizmo->switches->buttons->NumberButton”. Enter the properties dialog for each button and add “Trap->Quest Var” property. In the window type you need to enter a name for code variable. Type something descriptive like “secret_code”. This where the code will be stored. We’ll use this variable later. Also add “Shape-> TxtRepl r0” property and type in “obj\txt\buttonX”, where X is the number of the button (from 0 to 9).

Let’s move on. Create an odometer (“physical->gizmo->Gauge->Odometer”) and place it somewhere. It will display the code when it’s being typed. If you don’t want the player to see what he types, so place the odometer somewhere inside a wall. Enter the odometer’s properties and add “Trap->Quest Var” where type in the same variable name like in the buttons (“secret_code” here).

Create “QuestVarTrigger” (“fnord->TrapTrig->QuestVarTrigger”) and place it near the secret door (for easy access later). Add property “Trap->Quest Var” and type in “”XXXX:secret_code”, where XXXX is a code and secret_code is you variable’s name. Note that quotation marks are required at the beginning of string. It should looks just like this (the code is 3333 here):

This will actually check the variable for desired code. Enter the links window and create a ControlDevice link from this trigger to the secret door.

This part is optional. If you want to create a secret code only for one door, you can skip it. Place a marker (“fnord->Marker”) and name it (if you want) something like “Distributor”. Add link ScriptParams with From field – this marker’s number, To field – QuestVarTrigger’s number and Data – “CodeRelay”.

Enter the odometer’s links dialog and add new link: Flavor – “ScriptParams”, From – an odometer’s number, To – marker’s number (or QuestVarTrigger number if you didn’t use the marker). And enter the data value – “CodeRelay”.

That’s all. Our code lock is ready to use. Now about optional part. The marker is needed for switching a number of doors, like it was in the second mission of Thief II. Btw, when you enter another code the door opened before closes. To add another door to your schema, add QuestVarTrigger for every door added and create a same ScriptParams link from marker to desired trigger with Data field  – “CodeRelay”. To learn more about QuestVarTrigger see the official documentation “Traps & Triggers”.

P.S. I didn’t test the schema without marker, so if it doesn’t work use the optional part and please TELL ME ABOUT THAT.


About this entry