Classes:Powerup

From ZDoom Wiki

Jump to: navigation, search
Power-up
Actor type Internal Game
DoomEd Number None Class Name Powerup

Classes: InventoryPowerup

 →PowerDamage
 →PowerDrain
 →PowerFlight
 →PowerFrightener
 →PowerHighJump
 →PowerInvisibility
  →PowerGhost
  →PowerShadow
 →PowerInvulnerable
 →PowerIronFeet
  →PowerMask
 →PowerLightAmp
  →PowerTorch
 →PowerMinotaur
 →PowerMorph(development version only)
 →PowerProtection
 →PowerRegeneration
 →PowerScanner
 →PowerSpeed
 →PowerStrength
 →PowerTargeter
 →PowerTimeFreezer
 →PowerWeaponLevel2

Powerups are internal classes that are placed in the player's inventory to tell the game that the player possesses a power.

In this context, the word "powerup" refers to the power itself, not to the PowerupGiver item that you pick up in order to get the power. For example in Doom, the radiation suit is a powerup giver and isn't itself a powerup; instead it gives a power, in this case "protection from radiation", whimsically named the "IronFeet" powerup by the programmers who made Doom.

In the same way, the word "powerup" has traditionally been used for all kinds of artifacts in the game, but some of them are not actually true powerups nor powerup givers; for example in Doom, the soulsphere is actually a very powerful form of HealthBonus and the gained health is just normal health; however, the iron feet power that the radiation suit gives is a true powerup, because the effect lasts over a period of time and stays with the player until it is exhausted.

If a negative duration is given to a powerup subclass, it will be the amount of seconds the power stays active. (development version only) If a powerup has the INVENTORY.HUBPOWER flag, it stays active when moving between levels within a hub. If a powerup has an Inventory.Icon property, this icon is displayed on the HUD while the power is active. (All standard HUDs will place it in the upper-right corner.)

Note that powerup is an abstract class - you do not give the player a generic powerup item, rather the associated powerup giver must give one of the predefined subclasses of powerup, such as IronFeet or WeaponLevel2. Currently, there is no way in DECORATE to create completely new powerups, but some powerups, such as Protection and Morph are explicitly designed so that you can subclass them to a limited extent.

DECORATE definition

Actor Powerup : Inventory native {}
Personal tools