Monitor

From SRB2 Wiki
Jump to: navigation, search
SRBXA0.png SHTVA0.png PINVA0.png YLTVA0.png WHTVA0.png ELTVA0.png EGGBA0.png PRUPA0.png
Monitors

Monitors (or item boxes) are special Objects that commonly appear in levels in SRB2. As in the classic Sonic games, these Objects resemble computer monitors or televisions – the designs of the monitors in SRB2 are based on those from Knuckles' Chaotix. If a player breaks a monitor open, they will receive a power-up or bonus (or sometimes a negative effect) from it. However, monitors can only be broken if a player directly spins or jumps (or glides as Knuckles) into them; projectiles and Armageddon Shield blasts will have no effect on these. If the player jumped onto a monitor to break it, they will bounce back upwards off them, allowing the player to break further monitors or enemies afterwards before landing on the ground again (this is known as "Monitor bouncing").

The icon displayed on a monitor usually identifies what effect will be given when it is broken (except in the case of Random Monitors, where the effect is randomised). When the monitor is broken, a secondary "monitor icon" Object will be created that displays this icon and rises into the air to a certain extent – after a short interval, the monitor's power-up or bonus (or otherwise) is awarded to the player via this Object, and the Object itself then disappears.

As in most cases monitors in SRB2 are also solid Objects, it is possible for players to stand and walk on top of monitors if they did not jump or spin to get there. However, if a monitor falls onto a player from above, the player will be crushed and die – in competitive gametypes such as Match and CTF, a player is awarded points if they manage to pop the monitor before it falls on another player.

Monitors in SRB2

* SRB2 does not use these monitor types directly in maps; most appear as special replacements for other monitor types depending on the game mode or gametype being played, while Pity Shield and Gravity Boots Monitors never appear at all in normal gameplay. However, all of these are still available for custom maps to use.

Monitor respawning

When a monitor is broken by a player in Single Player/Co-op, it will remain broken for the duration of the level (or until the player respawns, if in Single Player). Outside these gametypes, monitors can have the ability to automatically respawn after a limited time: the console variable respawnitem toggles this feature on/off, while respawnitemtime determines how long it takes for a monitor to respawn after being broken.

Alternatively (outside of Single Player/Co-op), all monitors in a level can be replaced by a single type of monitor or made to not spawn at all: in Competition this is determined by competitionboxes; in other gametypes this is determined by matchboxes.

Weighted random monitors

In Match and Capture the Flag, a special randomized respawning mechanism is used to ensure a fair distribution of items in the map: Most monitor types in SRB2 can be given the Special or Ambush flag to turn them into weighted random monitors. A weighted random monitor will spawn normally when the map initially loaded, but when it respawns, the monitor type it will respawn as will be picked randomly from a predetermined table, where each monitor type has a fixed respawning probability. There are two types of weighted random monitors: the Strong Random Monitor (or SRM) and the Weak Random Monitor (or WRM).

The Special flag will turn a monitor into a Strong Random Monitor. When a SRM respawns, it will choose one of the following monitors to respawn as:

Monitor Icon Probability (fraction) Probability (percentage)
Whirlwind Shield
WHTVB0.png
3/16 18.75%
Elemental Shield
ELTVB0.png
3/16 18.75%
Force Shield
BLTVB0.png
3/16 18.75%
Attraction Shield
YLTVB0.png
2/16 12.50%
Armageddon Shield
BKTVB0.png
2/16 12.50%
Invincibility
PINVB0.png
2/16 12.50%
Extra Life Monitor
PRUPB0.png
1/16 6.25%

The Ambush flag will turn a monitor into a Weak Random Monitor. When a WRM respawns, it will choose one of the following monitors to respawn as:

Monitor Icon Probability (fraction) Probability (percentage)
Super Sneakers
SHTVB0.png
10/32 31.25%
Whirlwind Shield
WHTVB0.png
8/32 25.00%
Elemental Shield
ELTVB0.png
8/32 25.00%
Force Shield
BLTVB0.png
3/32 9.38%
Teleporter Monitor
MIXUB0.png
1/32 3.13%
Recycler Monitor
RECYB0.png
1/32 3.13%
Extra Life Monitor
PRUPB0.png
1/32 3.13%

The following types of monitors, none of which can respawn from an SRM or WRM, cannot be turned into weighted random monitors with the Special or Ambush flag:

Special and Ambush will also have no effect for all custom monitor types.

Custom monitors

ToDoIcon.png To do
A mini-tutorial on setting up a set of states/object types for a typical monitor

It is possible to make custom monitors for SRB2 with the use of SOCs. To make an Object behave like and be recognised as a monitor, it needs to be given the MF_MONITOR flag. However, MF_SHOOTABLE is also needed to allow the Object to be destroyed by a player. MF_SOLID is generally also given to monitors so that they can be stood on when the player is not spinning/jumping onto them.

The following Object properties control the monitor's behavior:

  • DeathState: When a monitor is popped by a player, it will go to this state to trigger the monitor's death sequence; ideally this state should use A_MonitorPop for the standard effects for a monitor.
  • DeathSound: Used by A_MonitorPop for the monitor's "pop" sound.
  • Speed: Used by A_MonitorPop to determine the Object type of the monitor remains spawned; usually this is set to MT_MONITOREXPLOSION. The Mass property of this Object type in turn determines the Object type of the explosion graphic also spawned (for MT_MONITOREXPLOSION this is MT_EXPLODE, for example).
  • Damage: Used by A_MonitorPop to spawn the Object type to use as the monitor's "icon" – this object is typically expected to have the MF_BOXICON flag so it can rise up into the air until it reaches a set height above the ground, and ultimately run the monitor's respective action. The icon Object's Speed and Damage properties determine the vertical speed and maximum height of the icon's rising respectively.
  Object types [view]
General EnemyBossPushableSpringMonitorNiGHTS power-upProjectileAmbient sound effect
Special PlayerShieldsFreed animalsEmblemOverlay
Related links List of Object types