Pushable

From SRB2 Wiki
Jump to navigation Jump to search
This article or section is outdated and has not been fully updated to reflect the current version of SRB2.

Please help the Wiki by correcting or removing any misinformation, as well as adding any new information to the page.


Pushables

Pushables are special Objects in SRB2 that have the ability to be pushed or stood on by players or other pushable Objects. They will also crush players should they land on them – in competitive gametypes such as Match and CTF, a player is awarded points if they manage to crush another player by pushing a pushable onto them. They can be propelled by springs and moved around by conveyor belts, and they will block crushers instead of being pushed into the ground or ceiling like regular solid Objects. If any pushables fall into a death pit however, they will not respawn.

Pushables have the ability to trigger linedef executors via Trigger Linedef Executor (Pushable Objects) (sector type 16), a sector special specially designed to activate a trigger linedef once a pushable touches the floor of the sector. In turn, linedef type 314 and linedef type 315 are specially designed to activate a linedef executor in the control sector when a specified number of pushable Objects are in a tagged sector.

Checking the Special flag makes a pushable lighter, so the player can push it more easily, and it can bounce off walls and other pushables. Checking the Ambush flag, on the other hand, makes it non-pushable, and disables the ability to trigger sector type 16 as well as linedef types 314/315 as it is technically not a pushable anymore. Checking both Special and Ambush flags, however, will instead make the pushable drop straight down when falling downwards by canceling out all horizontal momentum, stopping it from sliding after landing on the floor.

Additionally, pushables can also be pushed in stacks, the bottom-most pushable carrying along any other pushables on top with it when pushed. Players are also capable of being moved along with pushables when standing on top.

Pushables in SRB2

Although they are similar in appearance, the tumbleweeds (both Big and Small) are not pushable Objects like the above, and will not trigger any of the sector/linedef specials designed for pushables.

Custom pushables

It is possible to make custom pushables for SRB2 with the use of SOC or Lua. To make an Object type behave like a pushable, it needs to be given the MF_PUSHABLE flag. MF_SOLID is also needed to allow Objects such as the player to collide with it in order for it to be pushed around by them. The following Object type properties control the pushable's behavior:

  • ActiveSound: This is continuously played for as long as the pushable is being pushed by a player or another pushable. If the Object also has MF_BOUNCE (given by the Special flag), this will also play when the pushable bounces off a wall.
  • Speed: When the pushable has the Special flag checked, this will set the maximum speed it can be pushed at. The desired speed in fracunits should be multiplied by 65536 (the value of FRACUNIT).
  • DeathState: Pushables in general will go to this state if they fall into a death pit; if this is not set, they will be made to go to S_NULL instead and so will be removed from the map. Preferably this state should lead to S_NULL anyway if set at all.

Object flags

A number of Object flags are involved with pushable Objects:

  • MF_PUSHABLE: The main flag required for pushable behavior. This flag is removed when the Ambush flag (but not Special) is checked, and is replaced by MF2_STANDONME, allowing the Object to retain the ability to be stood upon (assuming MF_SOLID is also checked).
  • MF_BOUNCE and MF2_SLIDEPUSH: Both of these flags are given when the Special flag (but not Ambush) is checked; MF_BOUNCE enables the pushable to bounce off walls and other pushables or players, and MF2_SLIDEPUSH allows the pushable to slide after being pushed, and can be pushed up to a speed of its Speed property.
  • MF2_CLASSICPUSH: This flag is given when both Special and Ambush are checked; this will cause the pushable to cancel out all horizontal momentum when falling, which will prevent it from sliding on the floor after landing.

Also note that giving a pushable the MF_SCENERY flag will prevent it from triggering sector type 16, as is the case with both of the Eggman statues. However, they will still be able to trigger linedef types 314/315 by other means.

  Object types [view]
General EnemyBossPushableSpringMonitorNiGHTS power-upProjectileAmbient sound effect
Special PlayerShieldsFlickiesOverlay
Related links List of Object types