Pusher tutorial

From SRB2 Wiki
Jump to: navigation, search
Warning icon.png
This article or section should contain one or more images. Please spruce up the article by adding an image.

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 respectively water 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 and the wind tunnel in Egg Rock 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. For all wind effects, the target sector(s) where the effect should happen must have either the Wind/Current or the Ice/Sludge and Wind/Current sector special. Normally the first one will suffice, but the second one is used if you want both friction and winds in a certain area. This sector effect is necessary to make the wind effect work properly. 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, 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 pushers, 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. Just like with winds, the target sector should have either the Wind/Current or the Ice/Sludge and Wind/Current sector special. The setup of the control sector is also 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. If the waterslide is over water or under water depends only on how deep the water is. The player will always float on the bottom of the water unless jumping, so make sure that over-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 that 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 target sector(s) should have either the Wind/Current or the Ice/Sludge and Wind/Current sector special, and 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 of the effect.

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. You cannot, however, use the slide effect with this linedef special.

List of pushers

Samples

Sample 1

Example WAD: ex_ld541_wind.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows a horizontal wind effect.

Sample 2

Example WAD: ex_ld542_upwardswind.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows an upwards vertical wind effect.

Sample 3

Example WAD: ex_ld541_wind_slide.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows a horizontal wind effect with sliding mode enabled.

Sample 4

Example WAD: ex_ld544_current.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows a horizontal current effect.

Sample 5

Example WAD: ex_ld544_current_waterslide.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This shows a waterslide, which is a horizontal current effect with sliding mode enabled.

Sample 6

Example WAD: ex_ld547_push.wad

Sample 7

Example WAD: ex_ld547_pull.wad