Sectors:  circular sectors

 Convex doors:  special door tiles / wall lotags / examples

We are going to talk about convex doors in this section of the tutorials. You have seen these kind of doors in E2L2 and E2L5. You may want to examine these doors in the two levels just mentioned. I point out these two levels because for one, they are the first that came to mind when I thought about using original maps from Duke3D as an example, and the doors in E2L2 are activated by a switch (which you are probably well familiar with). These doors are also a good example of using the special
door tile textures.

These special  door tile textures have an added feature over other tiles: these tiles will act as a switch when given a lotag. The activator sprites placed in the door sectors will be activated by the wall lotags of those doors.

Examining the Convex Doors in E2L2
To check out these doors without extracting all the maps, at the Duke3d prompt type:  build e2l2
Switch to 2d mode, hold down the right mouse button and move the mouse. Watch the numbers in the bottom left corner of the screen. When the x-coordinate=36000 and the y-coordinate=-13000 (the first three digits of both the x and y are what will help you find the armory) you should be in the vicinity of the curved doors, the armory seen in the above screen capture.

As in any rotating effect (curved doors are not completely rotating but the set up is pretty much the same), the central sprite has a lotag of 1 and a unique hitag: in this case, hitag 6124 and its tail is positioned facing North. The sprites for rotation in these doors have the same unique hitag, 6124, but a lotag of zero and their tails point South. (Activators used in the doors should point in the same direction as the central sprite: North).

note: One interesting thing about these pair of doors is that one of the sprites has a hitag of 6125; I don't know why. In any similar effect, the sprites for the rotation all have the same unique hitag. I changed this oddity to 6124 like the others and it made no difference to the effect. Since I have never seen this before in other similar effects, I suggest you give all the sprites used for the rotation the same hitags. (Just check out the curved doors in E2L5 and you will see that all the rotation sprites have the same unique hitag, 79).

 Convex doors:  special door tiles / wall lotags / examples


Once you have all the sectors created, give the door sectors a lotag of 30. Place a sprite in the center of the circular structure and give it a lotag of 1 and a unique hitag. Place a sprite in each of the door sectors, leave their lotags at zero and give them both the same unique hitag.


The only difference in this semi rotational effect (that is, one door rotates to the left and one door to the right), is that the sprite in the left door (that is to your left as you stand in front of the doors in 3d mode), needs to have its palette changed to 2. Hold the cursor on it (in 3d mode), press and hold the Alt key, press the p key and enter the number 2 for the palette. If you want to add gspeed sprites, that's up to you. Add music sprites if you wish. Do all the sprite work and test the doors before pulling the floor of the door sectors up to the ceiling. Once the doors are operating properly, pull the floor of both door sectors up to meet the ceiling.

notes
  • The rotational sprite in the left door has got to have a palette of 2 other wise it will spin in the same direction as the door on the right. That is, both the left and right doors will spin open to the right. You cannot change the direction of its tail to make it spin the opposite way; the palette change is what makes this effect work.
  • Central sprite and the activator's tails points North, the sprite's tails in the doors point South.

 Door tile lotags:  making the tile behave as a switch

To have the door tiles act as the activating switch for the doors is easy but you need to use one of the special  door tile(s). These tiles will behave like a switch when given a lotag. In the example above, the activators in the doors have a lotag of 6122. Thus, you would place the cursor on each section of the curved doors (in 3d mode), press and hold the ' key (the apostrophe) and press t. You would then enter 6122 for the wall lotag.
In the E2L2 example, DOORTILE18 (tile# 447) was used.


Some other special door tiles are: (listed here by tile number) #150 through 159, 447-449, 717, 1102, 1144, 1169, 1178, and 1179 (v1.3 Duke3D). These special textures have names such as DOORTILE## with a number tagged on it. The door tile number does not match the tile number. For instance, the door tile in E2L2 example is named, DOORTILE18 but its tile number is listed as 447. If you cannot see the names of these tiles when you are selecting tiles in Build, make sure that the names.h file does not have the Read-Only attribute. Just right click on names.h and choose properties. If there is a check mark in the read-only box, remove it and you will then see the names in Build when viewing the tiles.