A_MonitorPop

From SRB2 Wiki
Jump to: navigation, search
Test.png This article or section is outdated and has not been updated to reflect the release of SRB2 v2.2.

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

ToDoIcon.png To do
Rewrite description for 2.2.0, the basic stuff of this action is totally different now. For instance monitors no longer spawn another Object for their remains, they now become the remains themselves!

Additional notes:

  • P_DoRandomBoxChances is used by the Random monitor to decide the item now, so see that function in the source code in case something was changed
  • This can actually be rigged to trigger a linedef executor now using lastlook?

A_MonitorPop is an action that is used as the thinker for monitors being popped, simultaneously spawning the explosion graphic and the remains of the monitor as well as the icon for the monitor. The actor Object itself will also disappear after use of this action.

The actor's Damage attribute determines the Object type to spawn as the monitor's "icon" (i.e. the item which will rise up and award the monitor's power-up to the actor's target), unless the Object is a Random Monitor (MT_QUESTIONBOX) – in which case, the Object type used for the monitor's icon is determined by the Damage attribute of a randomly selected monitor's Object type:

Object type Monitor Icon Console variable
MT_SUPERRINGBOX Super Ring Monitor
TVRIC0.png
tv_superring
MT_SNEAKERTV Super Sneakers
TVSSC0.png
tv_supersneaker
MT_INV Invincibility
TVIVC0.png
tv_invincibility
MT_WHITETV Whirlwind Shield
TVWWC0.png
tv_jumpshield
MT_GREENTV Elemental Shield
TVELC0.png
tv_watershield
MT_YELLOWTV Attraction Shield
TVATC0.png
tv_ringshield
MT_BLUETV Force Shield
TVFOC0.png
tv_forceshield
MT_BLACKTV Armageddon Shield
TVARC0.png
tv_bombshield
MT_PRUP Extra Life Monitor
TV1UC0.png
tv_1up
MT_EGGMANBOX Eggman Monitor
TVEGC0.png
tv_eggman
MT_MIXUPBOX Teleporter Monitor
TVMXC0.png
tv_teleporter
MT_RECYCLETV Recycler Monitor
TVRCC0.png
tv_recycler

By default, all monitors on this list have a probability of 8.33% of being used by a Random Monitor. The respective console variables can be used to increase or decrease the chances of each monitor being used.

If the icon is of Object type MT_1UPICO (the icon for the Extra Life Monitor), this action also handles the sprite the popped monitor's icon displays; if the actor's target's current skin has a sprite for the icon it will be displayed, otherwise it will display a default "1up" graphic. The skin color of the actor's target will also be applied.

The actor's Speed attribute is used to determine the Object type to spawn for the monitor's "popped" state – the actor's properties are transferred to the spawned object, and the actor's DeathSound is played for the monitor's "pop" sound. In turn, the Mass attribute of the Object spawned by the actor's Speed attribute is used to determine the Object type to spawn the explosion graphic, such as MT_EXPLODE for MT_MONITOREXPLOSION.

Object property Use
DeathSound Monitor popping sound
Speed Object type to spawn for monitor's "popped" state (normally MT_MONITOREXPLOSION)
Damage Object type to spawn for monitor's icon (unless the Object is a Random Monitor)
Mass (Of object type set by Speed) Object type to spawn for explosion's graphic

  Actions – Powers and monitors [view]
A_1upThinkerA_AwardScoreA_BombShieldA_CustomPowerA_EggmanBoxA_ExtraLifeA_ForceShieldA_GiveWeaponA_GravityBoxA_InvincibilityA_JumpShieldA_MixUpA_MonitorPopA_PityShieldA_RecyclePowersA_RingBoxA_RingShieldA_SuperSneakersA_WaterShield