A_SeekerMissile

From ZDoom Wiki

Jump to: navigation, search

A_SeekerMissile (angle threshold, angle maxturnangle)


Seeker missile handling. threshold and maxturnangle determine how 'aggressive' the missile will home in on its target. The larger the values the more precise it is.

  • threshold
Specifies the angle inside which the missile will home in directly on its target. If the angle toward the target is larger than threshold it will change its movement angle only partially towards the target.
  • maxturnangle
The maximum change of movement direction that will be performed in one move. maxturnangle should be larger than threshold. Both angles are specified in degrees and must be in the range [0, 90].

Examples

This is an example for a magic missile that homes in on it's target. It has a low maxturnangle which gives it a laggy turning effect

ACTOR MagicMissile
{
  PROJECTILE
  +RANDOMIZE
  +SEEKERMISSILE
  height 16
  radius 8
  speed 10
  damage (random(13,17))
  renderstyle Add
  alpha 0.8
  states
  {
    Spawn:
      MMIS B 2 bright A_SeekerMissile (0,2) //MMIS is the sprite used for the missile.
      loop
    Death:
      MMIS CDE 5 bright
      stop
   }
}
Personal tools