Classes:PowerDrain
From ZDoom Wiki
| Health drain power | |||
|---|---|---|---|
| Actor type | Power | Game | |
| DoomEd Number | None | Class Name | PowerDrain |
Classes: Inventory→Powerup→PowerDrain
PowerDrain is an internal class. An item of this class is placed in the player's inventory while the Drain powerup is effective. During the time this effect is active, the player will be given health for damage done to other monsters/players.
Like all other Powerups items of this class are never used directly. Instead you have to create a new item that inherits from PowerupGiver to give it to the player.
Example:
This defines ZDoom's Drain item and is an example for an item that is put in the inventory:
actor Drain : PowerupGiver
{
inventory.pickupmessage "Vampirism!!"
inventory.icon "MEGAA0"
powerup.color red 0.25
inventory.maxamount 0
inventory.usesound "pickups/slowmo"
powerup.type "Drain"
powerup.duration 1000
translation "128:143=176:191"
+AUTOACTIVATE
+INVENTORY.FANCYPICKUPSOUND
states
{
Spawn:
MEGA ABCD 4 bright
loop
}
}
DECORATE definition
ACTOR PowerDrain : Powerup native { Powerup.Duration -60 }

