Scroller tutorial

From SRB2 Wiki
Jump to: navigation, search

Scrollers are linedef types that scroll textures or flats in a certain direction. Also, players standing on a scrolling sector or climbing on scrolling walls will be carried with the scroller. The most notable use for scrollers are conveyor belts, which are a great way changing the average gameplay flow a bit. Apart from that, there are several other uses and implementations of this effect, depending on the used linedef types. This tutorial explains how to use them.


Wall scrollers

There are three different techniques to scroll walls, each with a slightly different setup. However, all of them only scroll the front textures of the target linedef. The back textures can not be scrolled. All linedef scrollers carry a player that's climbing on the walls with them.

Linedef type 500 and linedef type 501 simply scroll the wall left respectively right at a default speed. They are directly applied to the wall that should be scrolled. If the speed needs to be specified, linedef type 502 is used. For this, a control sector is created, and one of its linedefs is given the same tag as the target linedef that should be scrolled. The length and direction of the control linedef determine scrolling speed and direction of the target linedef.

For walls that should scroll vertically and diagonally, linedef type 505 or linedef type 506 are used. Linedef type 505 specifies scrolling speed through the front side offsets. The X offset determines horizontal speed and the Y offset determines vertical speed. Negative values make the texture scroll left instead of right or down instead of up. If the front side offsets are already used for alignment, linedef type 506 can be used, which uses the back side offsets instead.

Plane scrollers

Plane scrollers scroll flats instead of textures. Depending on the linedef used, they scroll either the ceiling or the floor. Additionally, one can specify if the flat is scrolled, the player is carried or both. In most cases, linedef type 530 is used for floor scrollers and linedef type 533 for ceiling scrollers, like scrollers on FOFs or in upside-down gravity. These scroll the flat and carry the player, making them ideal for conveyor belts. For purely visual effects, like scrolling water surfaces for example, linedef type 510 and linedef type 513 are used. If you want only the carrying effects without scrolling, use linedef type 520 and linedef type 523.

If the player should be carried, the target sector that will be scrolled must have the Conveyor Belt sector special – sector type 1024. This is used for making the game handle the scrolling correctly. If not used, the player will use his walking animation on the belt even if standing still. By itself, however, the sector type does nothing.

The next step is to set up the control sector. Everything is controlled by the linedef with the linedef special that should be tagged to the target sector. Speed is specified by the length of the linedef. The direction is determined by the direction the linedef is facing. This can be a bit tricky to figure out: Every linedef has a small notch in the middle of it. This notch is always facing to the right of the linedef. That means that if you have a notch facing east, your linedef is facing north.

If you have multiple scrolling sectors after another that are supposed to carry the player, you should check the Not Climbable on the control linedefs. Then any neighboring scrollers are grouped together as if they were one. This prevents the player from being pushed slightly faster over sector borders.

Conveyor belt visuals

It is generally a good idea to have conveyor belts use the flats THZFLR16 or THZFLR17. THZFLR16 is designed for conveyor belts going north/south, and THZFLR17 is designed for conveyor belts going west/east. Another option is CONVEY1 (north/south) or CONVEY2 (west/east).

When making conveyor belts that have a higher floor height than the sector or sectors around it, it is a good idea to use THZCONV1, THZCONV2, and THZCONV3 as linedef textures. Those are the textures used in Techno Hill Zone Act 2 and most THZ-themed custom maps that look like the ending and middle parts of a real conveyor belt. For an example of how they look, and how to set them up, try the example WAD that can be found at the bottom of the article.

Accelerative scrollers

Accelerative scrollers work differently from regular scrollers. Instead of continually scrolling at a set speed, they can accelerate and decelerate or even stop completely. These scrollers move according to adjustments made to their ceiling height. The distance from the original height determines the speed of the scroller. With the use of linedef type 407, the ceiling can be raised, which will speed up the scroller gradually. The higher the ceiling is in contrast to its original height, the faster it will move. With linedef type 401, you can also modify the speed instantly instead of accelerating gradually. The ceiling height cannot be lower than the original height though, if you want to change the direction, use either linedef type 435 or stop the scroller and start another one going into the opposite direction.

Displacement scrollers

Displacement scrollers are controlled with distance rather than speed. Like accelerative scrollers, they move according to adjustments made to their ceiling height. When the ceiling height is changed by one fracunit, the scroller will move by one fracunit. Thus, when used with linedef type 408, the speed of the ceiling movement determines the scroller speed and once the ceiling stops moving, the scroller stops too. With linedef type 401, you can move the scroller instantly by a fixed value, but that is not recommended, since it has little practical usage.

List of scrollers

Wall scrolling

Plane scrolling


Sample 1

Example WAD: ex_ld502_scrollwall.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows a horizontal wall scroller with adjustable speed.

Sample 2

Example WAD: ex_ld506_scrolltexturebybacksideoffsets.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows a diagonal wall scroller with additional starting offsets.

Sample 3

Example WAD: ex_ld530_scrollfloortextureandcarryobjects.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows four regular conveyor belts, each going into one horizontal direction.

Sample 4

Example WAD: ex ld531 scrollfloortextureandcarryobjects accelerative.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows an accelerative conveyor belt that can be moved into both directions and sped up with the use of arrow buttons.

Sample 5

Example WAD: ex ld532 scrollfloortextureandcarryobjects displacement.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows a displacement conveyor belt that can be moved into both directions with the use of arrow buttons.