Classes:InterpolationPoint

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
  1. This actor is already defined in GZDoom, there's no reason to define it again.
  2. In fact, trying to define an actor with the same name will cause an error (because it already exists).
  3. If you want to make your own version of this actor, use inheritance.
  4. Definitions for existing actors are put on the wiki for reference purpose only.
Interpolation point
Actor type Script thing Game MiniZDoomLogoIcon.png (ZDoom)
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
}