A_ScaleVelocity

From ZDoom Wiki
Jump to: navigation, search

A_ScaleVelocity (float scale [, int pointer])

Usage

Multiplies the calling actor's or the pointed to actor's velocity on each axis by scale. It can be used to "speed up" or "slow down" an actor.

Parameters

  • scale: The value by which to scale the actor's velocity.
  • pointer: The actor to scale its velocity. This is an actor pointer. Default is AAPTR_DEFAULT, which corresponds to the calling actor.

Examples

This lazy rocket slows down and eventually stops.

ACTOR LazyRocket : Rocket
{
  States
  {  
  Spawn:
    MISL A 1 Bright A_ScaleVelocity(0.95)
    Loop
  }
}