Creating simple projectiles

From ZDoom Wiki
Jump to navigation Jump to search
Nuvolabomb.png Warning: The feature described on this page has been deprecated, and will no longer be supported or updated by the GZDoom developers. While some functionality may be retained for the purposes of backwards-compatibility, authors are strongly discouraged from utilizing this feature in future projects and to instead use the modern DECORATE format. Compatibility with future GZDoom versions is not guaranteed.

The old DECORATE format allows for custom projectiles. The format is basically the same as for normal decorations, except you add the keyword "projectile" before its name, and you get to define the following additional properties:

  • DeathSprite - Sprite used when the projectile "dies".
  • DeathFrames - Animation sequence when the projectile "dies".
  • ExplosionRadius - Distance from the projectile's impact that its explosion can be felt.
  • ExplosionDamage - Amount of explosion damage done at the projectile's impact site. This is separate from Damage, and if you don't specify it, it will be the same as ExplosionRadius.
  • DoNotHurtShooter - Explosion damage does not hurt the thing that shot it.
  • DamageType - Defines the type of damage the projectile inflicts. See custom damage types.
  • Speed - How fast the projectile moves when you spawn it with the summon cheat.
  • SpawnSound - Sound the projectile makes when it spawns.
  • DeathSound - Sound the projectile makes when it "dies".
  • Damage - This is the damage the projectile does to whatever it directly hits and is actually a random amount based on the value you specify for it here. The damage calculation is 1d8 * n.
  • Doombounce - The projectile will bounce several times, slowly losing height before exploding.
  • Hereticbounce - The projectile will bounce once and then explode.
  • Hexenbounce - The projectile will bounce forever.

An example follows:

   projectile FooShot
   {
       SpawnNum 255
       Sprite PLSS
       Frames "24:AB"
       DeathSprite PLSE
       DeathFrames "ABCDE"
       Radius 13
       Height 8
       Speed 70
       Damage 1
       NoBlockmap
       NoGravity
       ActivatePCross
       ActivateImpact
       NoTeleport
       SpawnSound "weapons/plasmaf"
       DeathSound "weapons/rocklx"
       ExplosionRadius 1024
       ExplosionDamage 16
       DamageType Ice
       DoNotHurtShooter
   }