Pusher tutorial

From SRB2 Wiki
Jump to navigation Jump to search
Waterslide from Deep Sea Zone Act 2.

Pushers are linedef types that push players and other Objects into a certain direction as long as they are inside a specified sector. Unlike scrollers, they don't scroll any flats, and they take effect anywhere inside a sector, not just when touching the floor or ceiling. There are three types of pushers: Winds and currents push through air and water, respectively, and are available in horizontal and vertical versions. Push/pull effects use a specific point of gravity to push from or pull to. Additionally, mappers can decide to enable a sliding effect for pushers that will force players into their pain sprites and prevent them from slowing down or speeding up. This effect is notably used for the waterslides seen in Deep Sea Zone Act 2.

Winds

Winds are pushers used in air. When used on a target sector, players will be pushed into the given direction as long as they are inside it.

The first step is to set up the control sector. Everything is controlled by the control linedef with the linedef special, which should be tagged to the target sector. Speed is specified by the length of the linedef. For horizontal winds, the linedef special to use is linedef type 541. 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.

For vertical winds, you don't need to specify the direction. Simply use linedef type 542 for upwards wind and linedef type 543 for downwards wind. The speed is again controlled by the linedef length. Note that you cannot determine the direction players will face while pushed up or down; they will always face to the north.

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

Normally, players can still steer against the wind by running against it, but you can disable their controls by using the Solid Midtexture flag on the control linedef. In that case, the players will be forced into their pain sprites and can only steer to the sides, but not turn around, slow down or speed up.

Currents

Currents are essentially the same as winds, except that the target sector should always be a water FOF. The setup of the control sector is the same: Linedef length controls speed, and linedef direction controls the direction for horizontal pushers. Horizontal currents are made with linedef type 544, upwards currents with linedef type 545 and downwards currents with linedef type 546.

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

Normally, players can still steer against the current by running against it, but you can disable their controls by using the Solid Midtexture flag on the control linedef, thus turning the current into a waterslide. In that case, the players will be forced into their pain sprites and can only steer to the sides, but not turn around, slow down or speed up. Whether the waterslide is above or below the water surface depends only on how deep the water is. The player will always float on the bottom of the water unless they jump, so make sure that above-water slides are shallow enough.

When making currents where the water surface can be seen, it is common practice to scroll the surface as well. You can do this by applying linedef type 513 to the ceiling of the water FOF. The speed should be the same as the current effect so that the two match up. For more information on the scrolling effect, see the plane scroller section of the scroller tutorial.

Push/pull effect

Push and pull effects work like wind and currents for the most part, except that the direction is controlled entirely with Things. Again, the length of the control linedef sets the force of the effect. For both push and pull effects, linedef type 547 is used. The actual point of gravity and whether it's a push or a pull effect is determined by a Thing. Somewhere inside the target sector, a Push Point or a Pull Point should be located. The Angle of this Thing also determines the radius inside which the effect applies.

Again, if you have multiple pusher/puller sectors after another that are supposed to carry the player, you should check the Not Climbable flag on the control linedefs. Then any neighboring pushers/pullers are grouped together as if they were one. This prevents the player from being pushed/puller slightly faster over sector borders. You cannot, however, use the slide effect with this linedef special.

List of pushers

Samples

Sample 1

Example file: ex_ld541_wind.wad (MAP01) 
  • This shows a horizontal wind effect.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld541_wind.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld541_wind.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 2

Example file: ex_ld542_upwardswind.wad (MAP01) 
  • This shows an upwards vertical wind effect.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld542_upwardswind.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld542_upwardswind.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 3

Example file: ex_ld541_wind_slide.wad (MAP01) 
  • This shows a horizontal wind effect with sliding mode enabled.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld541_wind_slide.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld541_wind_slide.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 4

Example file: ex_ld544_current.wad (MAP01) 
  • This shows a horizontal current effect.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld544_current.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld544_current.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 5

Example file: ex_ld544_current_waterslide.wad (MAP01) 
  • This shows a waterslide, which is a horizontal current effect with sliding mode enabled.
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld544_current_waterslide.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld544_current_waterslide.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 6

Example file: ex_ld547_push.wad (MAP01) 
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld547_push.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld547_push.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.

Sample 7

Example file: ex_ld547_pull.wad (MAP01) 
How to use
  • You may load this file into your favorite map editor, such as Zone Builder. Select MAP01 as the map to load.
  • You may also load this file in the game:
    1. Save ex_ld547_pull.wad into the addons folder of your SRB2 directory.
    2. Start SRB2, go to the Addons menu, and then select ex_ld547_pull.wad.
    3. Start the game in Single Player mode.
    4. Press the Console button (~), and type in the command MAP MAP01 to access the example map.
  • When you load this file in the game, it replaces Greenflower Zone Act 1.