Classes:FastProjectile

From ZDoom Wiki
(Redirected from FastProjectiles)
Jump to: navigation, 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's actually harmful as it can 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.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
Fast projectile
Actor type Internal Game MiniZDoomLogoIcon.png
DoomEd Number None Class Name FastProjectile


Classes: FastProjectile
 →BlasterFX1
 →CFlameMissile
 →MageWandMissile

A base class for all fast projectiles, with special movement code. Standard missile code doesn't manage speeds greater than about 60 very well. To create a fast-moving projectile, inherit from this class or one of its children classes.

The MissileType property has a special use for fast projectiles. When one is specified, several (at least eight) are spawned every tic in the projectile's wake, as a trail. The greater the speed, and the smaller (yet non-null) the radius, the more numerous the steps. See MageWandMissile for an example of use, and MageWandSmoke for how a trail actor might be defined.

The MissileHeight property also has a special use for fast projectiles. Normally, trails are spawned 8 map units lower than the projectile itself. Using this property, the trail's height can be adjusted to different heights. To spawn the trail at the same height as the projectile, use a MissileHeight of 8.

Due to the movement code, fast projectiles are destroyed if they are incapable of moving or hit any plane. Hence, bounce properties that imply losing momentum or other plane related flags don't work. Flags that don't imply change of momentum (like +HEXENBOUNCE) still work (needs more testing). Fast projectiles will also never have gravity, even with -NOGRAVITY defined.

Ripper projectiles will also cause a lot of bloodshed, which can slow down a game's FPS quite considerably, so use with caution.

Trails spawned by FastProjectile inherit their pitch and set the projectile as their target. To get the owner (for explosions, ownership, etc), use the GETOWNER flag.

DECORATE definition

Actor FastProjectile native
{
  Projectile
  MissileHeight 0
}