Classes:InterpolationPoint

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'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.
Interpolation point
Actor type Script thing Game MiniZDoomLogoIcon.png
DoomEd Number 9070 Class Name InterpolationPoint


Classes: InterpolationPoint

Interpolation points define a path to follow. They operate similarly to the patrol points of a monster patrol route.

Arguments

Interpolation points take five arguments:

  • args[0] → pitch of camera in degrees, equal to the angle subtracted from 256.
  • args[1] → time (in octics) to travel to next node.
  • args[2] → time (in octics) to stop at this node before continuing
  • args[3] → low byte of tid of next InterpolationPoint in the path.
  • args[4] → high byte of tid of next InterpolationPoint in the path.

args[3] has the low byte, and args[4] has the high byte, so the tid is args[3]+(args[4]*256). This lets you use more than 255 points for all paths. For example, if the next point had a tid of 4 then the low byte is 4 and the high byte is 0. But if the next point has a tid of 3027, the low byte is 211 and the high byte is 11 (11×256 + 211 = 3027).

Since an interpolation point needs parameters to work, it cannot have a thing special. To have a thing special executed when an interpolation point is used by one of the moving objects (ActorMover, MovingCamera or PathFollower), you need to create a an interpolation special with the same TID as the interpolation point.

DECORATE definition

ACTOR InterpolationPoint native
{
  +NOBLOCKMAP
  +NOGRAVITY
  +DONTSPLASH
  RenderStyle None
}