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 Act 1 for the rope pulleys. Additionally, the rope hang effect can be used for static rope hangs as seen in Egg Rock Zone Act 2 and minecart rides, which will be seen in Arid Canyon Zone Act 2. All 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.
Contents |
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 be 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 (the only possible exception are minecarts, but even here FOFs should be used to restrict unwanted side effects).
Create a target sector where your FOF should be a 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 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.
| | 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 put Zoom Tube Waypoints on 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.
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 - the 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 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. This means essentially that the linedef should be completely horizontal, and stretch from left to right. The X distance determines speed. The value used for the rope hangs is 80 fracunits.
The linedef flags 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 Effect 1 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. If you check the Effect 5 flag, you will activate minecart mode. In this case, players will spin on top of the waypoints rather than hanging from them. For minecarts, you should make sure the waypoints are as high as the top of the FOF, or players will be submerged inside it.
The last step is to improve the collision detection. By default, players only cling on to rope hangs when touching the floor. 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 Effect 3 flag to make the special activate when touching any part of the sector.
This section of the tutorial will teach you how to build rope pulleys that look like the ones seen in ACZ1. You could theoretically make seem look totally different without losing the functionality, but this tutorial teaches you to make an exact replica. It is assumed you are making a rope pulley stretching east to west. For north-south rope pulley, the scrolling effects and flats must of course be adjusted to fit the direction.
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.
ACZRFL1A, 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, the flats might be misaligned, which can look very weird. Either use Linedef Type 7 to align them or move them around until the textures fit.
ACZWALLH, the floor flats are ACZRFL1A.
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.
ACZPULLW as the texture. The target sectors are assumed to have tag 4 for this tutorial.
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, the scroll effects have to be applied separately.
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 could of course use a different speed if you wanted 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.
ACZRFLR1A 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.
MAP01, replacing Greenflower Zone Act 1.