Doors - 3d control and motion in ROOMS desktop worlds

1 - Introduction
2 - References
3 - Instructions

1 - Introduction

Normally when you create a door in ROOMS you get to choose whether the door moves up or down or left or right when it opens. And it opens either when you click on it or collide with it.

The predefined motion is specified by 3d control statements which are stored in a file. You can create your own control statement files and make doors open in response to different stimuli (events) and to behave in different ways (actions). These control statements are refered to as EVAC (for EVent-ACtion).

This page tells you how to modify the properties of a door to give it its own special behavior. NB You need a ROOMS Creator license to create and modify EVAC files.

TIP: Click on the print-vu button (top right) to display this page with dark text on a light background for easy printing.

2 - References

See also the EVAC manual and EVAC Editor help which is part of ROOMS F1 Help.

3 - Instructions

We take as our starting point an existing door. This may be from a sample world or may have been created automatically when a room was last added.

The task is to make a copy of the EVAC (control) file for the door and to modify the behavior to make the door respond only to left clicks of the cursor, and when moving to open upwards in an arc rather than slide.

(a) Load the ROOMS world which includes the door you want to adjust, and get a clear view of the door. Right click anywhere and select the Design menu option from your popup menu. The cursor changes to indicate you are in design mode.

(b) If the door has started to open, let it go through its full cycle until it has closed. Now right click anywhere and check the EVAC>pause EVAC option. This will prevent any EVAC anywhere in the world from running, and makes life easier.

(c) Right click on the door itself and select Properties which will launch the property wizard. Once the wizard starts, go to wizard page 6 which lets you choose behavior, and click on the Advanced button.

(d) The Advanced Behavior Options dialog is displayed. In the Event-action field there is probably a file with a name like _doorup.rvc. This is the EVAC file. Click the Edit button to launch the EVAC editor.

(e) The EVAC editor will automatically load the EVAC file and display its content.

(f) Click on the Save As button. A save file dialog is displayed. Save to a new file name (say _rolldoor.rvc). Notice that when you return to the EVAC editor the new file name appears in the EVAC file field at the top of the dialog.

(g) Notice that the first two line of the EVAC file (as displayed in the editor) are "ON select" and "ON collide". The first part of the task is to disable the collision response i.e. so that the door no longer opens when you collide with it.

(h) Left click on the "ON collide" line. It gets highlighted. Then click on the "Delete row" button. The "ON collide" line (or row) gets deleted. This EVAC file will no longer respond to collisions.

(i) To be properly tidy, we should also delete the sub-events which formed part of the original collison response. If you scroll down the list you will see that there are a number of lines starting "IN coldoor" "IN colopen" "IN colpause" and "IN colclose". These are all sub-events from the original ON collide event. You can delete all of these lines(rows). The easiest way to delete them is to select the very last row first and delete that. This lines up the new last row for deletion.

(j) Now that the rows are tidy, it is probably opportune to click Save to save the work so far.

(k) Now we are going to change the door motion from sliding to rotating. Double click on the "IN selopen MOVE UP BY 0.10000 FOR 10" (or similar) row. It gets copied to the editor fields, below, in the Working row box.

(l) Click on the action drop-down list and select the "MOVE TURNUP" option. Edit the magnitude field and change the magnitude from 0.1 to 0.05. Then click on the Replace row button.

(m) Now change the "IN selclose MOVE DOWN BY 0.10000 FOR 10" (or similar) row to "IN selclose MOVE TURNDOWN BY 0.05 FOR 10". Remember to click on the Replace row button.

(n) Save the EVAC file and click OK.

(o) You are returned to the Advanced Behavior Options dialog. You need now to browse and select the new file which you have just been working on. Click on Browse to find it.

(p) Now uncheck the Properties of a door? option. You have to do this because we need to reposition the door by hand. Then click OK to leave the Advanced Behavior dialog and complete the wizard session.

(p) You are returned to the ROOMS world. Left click on the door and drag it upwards by about half its height. Then right click on the door and select the EVAC>Store position option. You need to do this because EVAC-bearing objects are restored to their recorded base position relative to their center of gravity, and we are about to change its center of gravity (if you dont do this the door disappears and is difficult to recover).

(q) The rotation(turn-up/swing) instruction we have specified for the door acts about the base of the door (assuming the door was automatically created when adding a new room). The axis of rotation is determined by the axes used when defining the door shape. These axes can be changed so that the door rotates about it top edge. We will now make this change.

(r) Right click on the door and select the Shape>Shape wizard option from the Design menu. This starts the shape wizard for the door.

(s) Go to page 3 of the shape wizard and click the "Edit Stencil" button. The Stencil editor is displayed. You will see a rectangle. This is the stencil (roughy speaking, cross-section) for the door. Notice that the rectangle rests on the horizontal axis and lies above the horizontal. We need to shift the rectangle so that its top edge rests on the horizontal axis. The Stencil editor can do this automatically for you, select the Edit>Shift horizontal option from the menu bar. The rectangle moves to align its top edge to the horizontal axis. Click the File>Save option from the options menu. And click File>Exit to leave the stencil editor.

(t) Complete the Shape wizard session without further changes. When you return to the current world you will see the door jump to a new position. This is because we have changed its position relative to its stencil origin (The stencil origin remains in the same place in the world).

(u) Drag the door upwards so that it fills the doorway. You may want to check that it fits squarely in the doorway by inspecting it in map view mode (press 7 to get into map mde, press 8 to get back to immersive view. Remember you can zoom in map mode).

(v) When you are satisfied with its position, store its position: select EVAC>Store position from the Design popup menu.

(w) Now give it back the properties of a door. Right click on it and select Properties to launch the Property wizard. Go to the Behaviors page of the wizard, click on the Advanced button and check the Properties of a door? box. Click OK and finish the wizard session.

(x) For safety, save the world to a new working world file. Press SHIFT and right click on the background. The main popup menu is displayed. Select Desktop>Save as to save the world to a new world file.

(y) Finally, re-enable EVAC, click EVAC>Pause EVAC from the Design menu.

(z) You should now find that the door swings open, from the top, when you left-click it, but does not respond at all when you collide with it.

If you need any more information, please
contact us.



ROOMS 3D Desktop sitemap
Jack Calverley: science fiction, crime, and mystery stories