GetActorVelZ
From ZDoom Wiki
int GetActorVelZ (int tid)
Usage
This returns the velocity of the actor along the Z axis. Positive values means upward movement; negative values are downward.
Parameters
- tid: TID of the actor.
Return value
The Z velocity of the actor, as a fixed point value.
Examples
This example prints the current speed of the player. It uses the sqrt function which must be included. Note that the fixed point variant of sqrt is used.
script 1 enter
{
int x, y, z, speed;
while (TRUE)
{
x = GetActorVelX(0);
y = GetActorVelY(0);
z = GetActorVelZ(0);
speed = FixedMul(x, x) + FixedMul(y, y) + FixedMul(z, z);
print(f:sqrt(speed));
delay(1);
}
}