3DMidTex advanced topics

From Eternity Wiki
Jump to navigationJump to search

3DMidTex are useful for more than just bridges. This tutorial will walk you through the process of making a door, a lift, and a floating switch. If you have not read the first tutorial, you may want to read 3DMidTex tutorial.

3DMidTex switches[edit]

When a 3DMidTex line has a linedef switch special, the 3DMidTex acts as the switch, and is height restrictive. This means the player has to be touching the switch (on the Z axis, as well as X and Y) to trigger it.

Linking a 3DMidTex to sector movement[edit]

Eternity provides linedef specials which allow you to link sector movement (either floor or ceiling) to 3DMidTex lines. Using these specials you can create any kind of moving structure.

On UDMF or ExtraData: Sector_Attach3dMidtex
On the classic Doom format:
Special 281 - Link linedef front sector floor movement to all tagged 3DMidTex lines.
Special 282 - Link linedef front sector ceiling movement to all tagged 3DMidTex lines.

(Note: In Doom Builder's current Eternity configuration, these specials can be found in the "Sector" category.)

Making a 3D door[edit]

Making a 3DMidTex door is very simple. First, create the door.

3dmidtex tut5.jpg

Here, the example door is in the middle of a bridge that crosses a large expanse, and a fence has been built on either side of the bridge to prevent the player from running around the door. Notice the door is made into two lines, both lines having their front sides facing out. Set the special of both these lines to Door_Raise (or on Doom format: 63, "SR Open door wait close") and set their tags to 1 (if on UDMF, also set the first argument of Door_Raise to 1). If you run the map right now, nothing will happen because these two lines comprise the door that the player will interact with. The actual movement is going to be caused off screen.

Create a small sector out of the way. Set the floor height to 0, the ceiling height to 0 (so it's closed) and set the tag to 1. This sector will become the sector that moves the 3DMidTex door, and this door will be triggered when the player presses on the 3DMidTex door. Next, create another sector attached to your first one. Set the floor to 0, the ceiling to 64 and set the tag to 0. This sector will give the door sector you just created a height to raise up to.

Last, set one of the linedefs of the door sector (make sure it's one that faces in the door sector) to have a Sector_Attach3dMidtex special with do_ceiling set to 1 (or give it linedef special 282 on the Doom format), and the line_id (or tag on the Doom format) of 1. This links the movement of the sector's ceiling to the 3DMidTex door (which you will remember also has a tag of 1).

3dmidtex tut6.jpg

Now simply run the map and press on the 3DMidTex door. The door should now raise up, wait for 3 seconds, and close. If the player is caught under the door, it will now close (just like if the player was caught under a sector ceiling closing) because the link is two way. This also means that crushing ceilings will cause 3DMidTex lines to do damage to things when they are caught.

See also[edit]