Classes:PowerMorph

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do NOT need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it will cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
Transformation power
Actor type Power Game MiniZDoomLogoIcon.png (ZDoom)
DoomEd Number None Class Name PowerMorph


Classes: InventoryPowerupPowerMorph
   (more)

PowerMorph is an internal class. An item of this class is placed in the player's inventory while the Morph powerup is effective. When the power is initially given, the player will be morphed into another player class and will stay that way until the power expires, upon which they will unmorph back into whatever player class they started out as. This power makes the morphing effect available as a power instead of a curse.


Using in DECORATE

The PowerMorph base class defines the same special properties as the MorphProjectile class, except for the MonsterClass property, which doesn't apply to players and the Duration property, which for powerups is set via the associated powerup giver. They are summarised here; for full details and additional notes, please refer to the MorphProjectile class.

  • PowerMorph.PlayerClass classname
Defines what class to morph the player into.
  • PowerMorph.MorphStyle flags
Defines the behaviour of the morphing effects.
  • PowerMorph.MorphFlash classname
Defines the effect flash actor to spawn when the player morphs. If omitted, the game's default teleport fog is used.
  • PowerMorph.UnMorphFlash classname
Defines the effect flash actor to spawn when the player unmorphs. If omitted, the game's default teleport fog is used

Example:

The example below defines a Morph item that, when activated, turns you into another actor for two minutes; it is modeled after the Porkelator.

ACTOR Kittylator : PowerupGiver 666
{
 ....
 Inventory.PickupMessage "Thou possesseth the Kittylator!!"  
 Inventory.PickupSound "world/thunder"
 ....
 Powerup.Type Kitty 
 Powerup.Duration 4200// about 120 seconds
 +COUNTITEM
 +FLOATBOB
 -INVENTORY.AUTOACTIVATE
 -INVENTORY.ALWAYSPICKUP
 States
 {
  Spawn:
   KITT A 12
    ....
    Loop
 }
}
ACTOR PowerKitty : PowerMorph
{
 PowerMorph.PlayerClass "LargeBlackCat"
 PowerMorph.MorphStyle (MRF_FULLHEALTH|MRF_ADDSTAMINA)
}

Notes:

Customisable pickup and weapon switching for morphed players and things like that are being considered on the "to do" list, but may not be possible until DoomScript. You can give a morphed class the +PICKUP actor flag, but this causes a lot of trouble with weapon switching; for full details and additional notes, please refer to the MorphProjectile class.

DECORATE definition

ACTOR PowerMorph : Powerup native
{
  Powerup.Duration -40
}