Springs are common objects in Sonic games that propel the player upward and/or forward at a high speed. In SRB2, there are three types of springs that propel the player at different strengths; from low to high these are colored blue, yellow and red. Depending on the type of spring, they propel the player either upward (e.g. Yellow Spring), downward, diagonally upward and forward (e.g. Diagonal Yellow Spring) or diagonally downward and forward.
The height to which a spring can propel the player is impacted by two things: A player who is about 50 fracunits below a ledge will be automatically be pulled up to that ledge, increasing the practical height to which a vertical spring can propel the player. The pull-up effect increases with the player's speed, so the effect will be larger for stronger springs. Additionally, any object that is underwater and breaks the water surface will be given a speed boost that is proportional to their current speed. This means that underwater springs, especially stronger springs, will propel the player to a much larger height if they allow the player to break the water surface.
Springs in SRB2
- Thing type 550: Yellow Spring – Propels the player approximately 450 fracunits into the air.
- Thing type 551: Red Spring – Propels the player approximately 1080 fracunits into the air.
- Thing type 552: Blue Spring – Propels the player approximately 166 fracunits into the air.
- Thing type 555: Diagonal Yellow Spring – Setting the Ambush flag on this and other diagonal springs will rotate it clockwise by 22.5 degrees.
- Thing type 556: Diagonal Red Spring
Spring Shells are similar to springs in that they use the SOC properties listed below in exactly the same fashion for exactly the same purpose, but they do not in fact have
MF_SPRING set; only part of them acts like a spring to players/pushables, the rest acts like a standard enemy Object instead. However, the yellow versions will spawn yellow springs when destroyed.
It is possible to make custom springs for SRB2 with the use of SOCs. To make an Object behave like a spring, it needs to be given the
MF_SPRING flag. The following Object properties control the spring's behavior:
RaiseState: The spring will go into this state when the player touches it. Springs that make a sound when touched should use an action that plays the appropriate sound in this state.
Mass: Indicates the vertical thrust of a spring. Negative values indicate downward thrust. To determine the
Massvalue that needs to be set in order to propel the player to a certain height, take the desired height in fracunits, take its square root and multiply it with the constant
FRACUNIT(65536). For example, a spring with a
16*FRACUNITpropels the player to a height of 256 fracunits.
Damage: Indicates the horizontal thrust of a spring. For purely vertical springs, leave this at zero.
PainChance: If set to 0, the player will change to their falling animation after bouncing on a spring (which is the default behavior as seen with SRB2's springs). If set to any other value, the player will change to their jumping animation, able to perform any aerial actions they would be able to perform if they jumped, such as their special ability.
| This disambiguation page lists articles associated with the same title.
If an internal link led you here, you may wish to change the link to point directly to the intended article.
|General||Enemy • Boss • Pushable • Spring • Monitor • NiGHTS power-up • Projectile • Ambient sound effect|
|Special||Player • Shields • Freed animals • Emblem • Overlay|
|Related links||List of Object types|