Rope hang tutorial

From SRB2 Wiki
Jump to: navigation, search

Rope hangs are FOFs that players can hang down from and that can carry them around along a set of waypoints. Players can jump off at any given time, but they cannot move as long as they are hanging on the rope hangs. This effect is notably used in Arid Canyon Zone for the rope pulleys. Additionally, the rope hang effect can be used for static rope hangs as seen in Egg Rock Zone Act 2. Both of these effects are made with a combination of FOFs, linedef type 11 and the Rope Hang sector effect. This tutorial includes instructions for all of these mechanics.

Simple rope hangs


The first thing you should do when making a rope hang is to create the FOF that will serve as the rope hang sector. While it is technically possible to make rope hangs without an FOF, this would look very awkward: If the rope hang effect was applied to a regular sector, players would hang in the air instead of from the FOF, and they would hang onto the non-existent rope no matter where they enter the sector. Thus, rope hang effects should always be used in conjunction with FOFs.

Create a target sector where your FOF should be and give it an unused tag. Then, create an intangible, opaque FOF with the use of linedef type 220 for that sector. We are using intangible FOFs to prevent players from standing on the rope. The actual collision will be handled by the rope hang effect. Of course, you can also use translucent or even invisible FOFs instead, but they should be intangible. If you use a rope texture like ACZROPE1, the FOF should probably be 16 fracunits high, but the size is up to you. It also should float at a reasonable height, so that players can jump into it but still hang above the floor below. Now give the FOF control sector the Rope Hang sector effect, which is number 45056, as well as an unused tag.


NoteIcon.png Note
This section assumes you know how the setup of Zoom Tube Waypoints works. If not, refer to the zoom tube tutorial.

The next step is to place Zoom Tube Waypoints in the target sector. These control the path for moving rope hangs, but you still need at least two of them for static rope hangs to make the effect work properly. Assuming that you made a simple rectangle, you should put one waypoint on each end of the target sector. The waypoints should still be inside the sector, but close to its edge. If you put them outside, players will be carried away from the rope, hanging in the air. The waypoints should have an Angle of 0 and 1, respectively (unless you are already using another waypoint sequence in your level, in which case you should add 256 for each new sequence), and their Z offset should be set to make them float between the floor and ceiling height of the FOF.

Linedef effect

Now you need to apply the rope hang linedef effect. For that, create a new control sector and give one of its linedefs linedef type 11 – Rope Hang Parameters. This will associate the waypoints with the FOF and control how fast the player is moved, if at all. The linedef should be tagged to the FOF control sector. The Y distance between the vertices determines the number of the waypoint sequence to use. Assuming that you used the first waypoint sequence (with an Angle of 0 and 1, as described above), you should leave this at zero. Essentially, this means that the linedef should be completely horizontal, stretching from left to right. The X distance determines speed. The value used for the rope pulleys in ACZ is 80 fracunits.

Additional steps

The flags of the control linedef with type 11 can be used to set some additional parameters. If you want to make the rope hang static, check the Not Climbable flag. Then the speed value will be ignored, and players will simply hang on the rope without moving. If you want the rope hang to be one-way, check the Slope Skew flag. Otherwise, the player will move back to the first waypoint after reaching the last one. In this case, make sure the the last waypoint is at the very edge of the sector, or players will automatically cling on to the rope again.

The last step is to improve the collision detection. By default, players only cling on to rope hangs when touching the bottom of the FOF. For most purposes, it makes more sense to activate it when touching any part of the FOF. To do that, give another control linedef (it can be on the same sector as the parameters linedef) linedef type 8 and tag it to the FOF control sector. Check the Peg Midtexture flag to make the special activate when touching any part of the sector.

Rope pulleys

This section of the tutorial will teach you how to build rope pulleys that look like the ones seen in ACZ. You could theoretically make rope pulleys that look entirely different but have the same functionality, but this tutorial will teach you to make an exact replica. It is assumed you are making a rope pulley stretching east to west. For north-south rope pulleys, the scrolling effects and flats must of course be adjusted to fit the direction.

The pulley

The target sectors of the pulley should look like this.

A rope pulley consists of two parts: the round wheels to each side, which stand on top of square metal beams, and the ropes hanging between them. While the metal beams are made of regular sectors, both the wheels and the ropes are intangible FOFs with a rope hang effect. The wheels are in fact divided into two separate FOFs, because the outer parts have rope textures on the sides and the inner parts have metal textures.

  • Wheels: These are two circles with 16 vertices and a diameter of 128 fracunits. In Zone Builder, you can create them in Draw Ellipse Mode. Click once on the map to start drawing and then drag the mouse around to form the circle. You can set the number of vertices in the menu bar at the top or holding Shift and scrolling the mouse wheel. Once you have formed the right shape, click again to create the circle. Give both circle sectors the same tag (assumed to be tag 1 for this tutorial). The FOF control sector should have a total height of 16 fracunits between floor and ceiling (make sure it's low enough for the player to jump on), ACZRFL1A as floor and ceiling flat, the Rope Hang sector effect and an unused tag (assumed to be tag 5 for this tutorial). The control linedef should have linedef type 220 and a middle texture of ACZROPE1. Note that depending on where these sectors are positioned on the grid, the flats might be misaligned, which will look weird. Either use linedef type 7 to align them or move them around until the textures fit.
  • Beams: These are 32×32 fracunit squares positioned in the middle of the wheels. They are regular solid sectors that reach up to the top of the circles. The textures should be ACZWALLH; the floor flats are ACZRFL1A.
  • Ropes: These are 16 fracunits thick, and all should linedefs face outward. Their outer parts are attached to the uppermost and lowermost vertex of the wheels, while the inner parts reach from wheel to wheel accordingly. You might need to move the vertices where they connect around a bit to achieve a width of 16 fracunits. Each rope needs a separate tag (assumed to be 2 and 3) and its own control sector, which also both need a separate tag (assumed to be 6 and 7). The control sectors are set to the same heights as the wheel FOFs, both the floor and ceiling flats are ACZFLR14 (ACZFLR22 for north-south pulleys), and both control sectors should have the Rope Hang sector effect. The control linedefs should have linedef type 220 and a texture of ACZROPE1.
  • Inner parts of the wheels: On each wheel, create a new sector by connecting the two inner vertices where the ropes attach to the wheels with a straight line. This is the inner edge of the circles, encompassing the segment in-between the ropes. Give these new sectors an unused tag (assumed to be tag 4 for this tutorial). This is the segment of the wheels that has no rope running along on its side. You can use the same FOF control sector as for the circles, but need a separate control linedef with ACZPULLW as the texture.

Scroll effects

The next step is to apply scroll effects to the ropes and the wheels, to give the impression that they are moving. Since the rope hang effect itself doesn't move the sectors it is applied to, the scroll effects have to be applied separately.

  • Scrolling walls: All visible walls should be scrolled with linedef type 506. These are all the sides of the wheels (even the insides with the ACZPULLW texture) except for the ones that are obscured by the ropes, and the sides of the ropes. You should apply the effect directly to the target linedefs, and use a back side X offset of 10 (to match the speed of the ropes in ACZ; you can of course use a different speed if you want to). The only exception are the two inner sides of the ropes, because those face the opposite direction. Thus, they should have an offset of -10. Again, make sure all linedefs face outward. Should a linedef not scroll, that might be because it's facing inwards. In that case, flip it with the Flip Linedefs tool. Note that the flipping tool will switch the offsets to the front side, so correct that manually.
  • Scrolling flats: The ACZRFL1A texture on the wheels is animated and doesn't need to be scrolled. The rope flats, however, do. Scroll the floors of the rope control sectors with linedef type 510 and the ceilings with linedef type 513. That makes four scrolling linedefs in total, two of each type and two for each control sector. If you used the same tags as in this tutorial, the tags should be 6 and 7. The length of the scroller linedefs should be 64 fracunits to match the speed of the scrolling walls. Make sure the scroller linedefs face the direction of the ropes that they scroll.


  • Waypoints: Four waypoints are used per wheel: One is positioned 8 fracunits below the uppermost vertex, one 8 fracunits above the lowermost vertex. The other two are (on an 8-fracunit grid) just next to the middlemost vertices, as can be seen in the screenshot above. The Angles should ascend from 0 counterclockwise, though it doesn't matter which waypoint is the first. Bear in mind that this tutorial assumes you are using the first waypoint sequence. You need a separate sequence for each rope hang. The Z offsets of the waypoints should be just between the ceiling and floor height of the rope pulley FOFs.
  • Rope Hang effect: Since there are three FOF sectors which are part of the rope hang (one for the wheels and one for each rope), three linedefs with linedef type 11 are required. It's best to make a new control sector for them and just have all three linedefs next to each other, each tagged to one FOF (the tags are 5, 6 and 7 in our case). The X distance of the linedefs should be 80. The Y distance is the waypoint sequence, which is assumed to be 0 in our case.
  • Special Sector Properties: A new control sector for linedef type 8 should be made. Again, we need to apply to this effect to all three FOF control sectors, so create three control linedefs with Peg Midtexture checked, each tagged to one FOF.


Sample 1

Example WAD: ex_ld011_ropehangparameters.wad

Sample 2

Example WAD: ex_ld011_ropehangparameters_static.wad