fuaZandroX modding reference

Actor

void A_OverlayRotate (int layer, float degrees = 0, int flags = 0)

A_OverlayRotate

Availability

ZandroX only. Does not exist in Zandronum 3.2. Behaviour follows UZDoom's A_OverlayRotate.

Works in netgames. A player's client runs its own layers and takes each layer's jumps from the server — see Psprite layers.

Usage

Turns a layer about its pivot, counter-clockwise on the screen for a positive angle. The pivot is the top left corner of the frame until A_OverlayPivot or A_OverlayPivotAlign moves it. PSPF_FLIP turns the other way, so a flipped layer mirrors an unflipped one.

The turn persists on the layer until changed; a state change does not reset it.

Parameters

  • int layer

    The layer to turn. 0 means the layer whose state is currently executing — see OverlayID. Does nothing if the layer does not exist.

  • float degrees

    The angle, in degrees. Default 0, upright.

  • int flags

    • WOF_ADD — add degrees to the layer's current turn instead of replacing it, and ease it over the tic.
    • WOF_INTERPOLATE — ease the change over the tic.

Examples

A knife swung in an arc, turning about its handle at the bottom right of the frame:

  Fire:
    KNIF A 0 A_OverlayPivot(OverlayID(), 0.9, 0.9)
    KNIF A 2 A_OverlayRotate(OverlayID(), 20, WOF_ADD)
    KNIF A 2 A_OverlayRotate(OverlayID(), 20, WOF_ADD)
    KNIF A 2 A_OverlayRotate(OverlayID(), -40, WOF_ADD)
    Goto Ready

See also