GXEntityVY - boxgaming/gx GitHub Wiki

Gets or sets the vertical velocity (vx) of the specified entity. The value of the vertical velocity (vx) is specified as the number of pixels per second. A positive value indicates downward movement. A negative value indicates upward movement.

Syntax

GXEntityVY entityId%, vy%
vy% = GXEntityVY (entityId%)

Parameters

  • Entity for which the vertical velocity (vx) will be set or returned is specified by the entityId% parameter. This id is returned by the GXEntityCreate function or can be accessed by its user id by the GX function.
  • The vertical velocity is specified by the vy% parameter.

Examples

Example1: Increase the current y velocity by 10 pixels per second.

vy% = GXEntityVY(warhog)
GXEntityVY warhog, vy% + 10

See Also

GXEntityCreate GXEntityX GXEntityY GXEntityMove GXEntityPos GXEntityVX GX