A_QuakeEx

From ZDoom Wiki
Jump to: navigation, search

A_QuakeEx (int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad [, sound sfx [, int flags [, float mulwavex [, float mulwavey [, float mulwavez[, int falloff[, int highpoint[, float rollIntensity[, float rollWave]]]]]]]]])

Usage

A_QuakeEx is an extended version of A_Quake with the ability to create an earthquake effect to manipulate the player's view along a specific axis, either in direct map axis or along the camera based upon the flags. It also allows adjusting the Z axis (quaking up and down). It also follows the same functionality, and creates an earthquake around the calling actor. In addition, it can also manipulate the ins and outs of an earthquake.

Wave quakes can stack, adding their effects on top of other wave quakes. This does not affect non-wave quakes any differently, however.

Parameters

  • intensityX/Y/Z: Strength of earthquake, ranging from 1 to 9, along a particular axis.
  • duration: Duration in tics
  • damrad: Radius of damage in map units
  • tremrad: Radius of tremor in map units
  • sound: Accompanying sound effect for the tremor. (Default: "world/quake".)
  • flags: Can be combined with the pipe "|" character. All flags are compatible with each other.
  • QF_RELATIVE: Adjust the X and Y intensities to quake along the camera view's front and side respectively.
  • QF_SCALEDOWN: Scales the intensity over the duration, going from full at the start of the quake to 0 upon finishing. Can be combined with QF_SCALEUP.
  • QF_SCALEUP: Scales the intensity over the duration, going from 0 at the start of the quake to full upon finishing. Can be combined with QF_SCALEDOWN.
  • QF_WAVE: Changes the quake from a randomly generated one to a sine wave, and are further controlled by mulwavex/y/z. Intensity is known as 'amplitude' in this form.
  • QF_MAX: Requires QF_SCALEDOWN and QF_SCALEUP. Fully scaled quakes will gradually scale from 0 to half intensity, and back to 0. This changes 0 to start from the defined intensity instead.
  • QF_FULLINTENSITY: Requires QF_SCALEDOWN and QF_SCALEUP. Fully scaled quakes will only scale in to the half intensity from their origins. This changes half to full intensity instead.
  • mulwavex/y/z: Only used with QF_WAVE. Specifies the number of waves per second the wave quake goes through while active. Default is 1. These are float values, so precision can be achieved.
  • falloff: Determines how far away the quake will start to reduce its amplitude based on distance. Takes the same arguments at tremrad in map units. Anything inside this will experience the full effect of the quake. Default is 0, which is no falloff.
  • highpoint: Only used with QF_SCALE<DOWN/UP>. Determines how far into the quake in tics for the quake to reach the peak of its shaking (or lack thereof if QF_MAX is included). Default is 0, or directly half way.

The following are Graficon.gif (GZDoom only: not supported by ZDoom)

  • rollintensity: The camera roll is affected in a similar way to intensityX/Y/Z if specified. Unlike normal intensity, this is not capped. If QF_WAVE is used, can also be negative to allow randomization. This feature does not rely upon the standard intensities and can be used separately (placing 0 in intensity and mulwave properties), but the flags affect it exactly the same.
  • rollwave: Similar to mulwavex/y/z, but for rolling.


Regular random quakes can stack with wave quakes, but to achieve this effect, one call to A_QuakeEx with QF_WAVE specified must happen with another call to the same function without QF_WAVE. This allows for cameras to shake along the wave, as the wave takes priority over where the jittering regular quakes positions. Wave quakes also will pause when the game is paused in any manner. Normally, regular quakes persist through an opened console for example, but wave quakes will always halt when a menu or console pause occurs. Similarly, rolling quakes follow the same behavior.

Contrarily to the Radius_Quake action special, the radii for damage and tremor are given directly in map units, not in "tiles" of 64x64 map units. This must be kept in mind when updating an actor definition from Radius_Quake to A_QuakeEx.

Examples

Cacodemon in this example die with quake around him:

Actor Caco4ZDoomWiki: Cacodemon replaces Cacodemon
{
 Health 600
 Scale 1.3
 Translation "16:47=168:191", "112:127=208:223"
 States
 {
 Death:
   HEAD G 12 A_QuakeEx( 2, 2, 2, 60, 0, 3000 ) //Light quake on 3000 map units around cacodemon death
   HEAD H 12 A_Scream
   HEAD IJ 12
   HEAD K 12 A_NoBlocking
   HEAD L -1 A_SetFloorClip
   Stop
 }
}

See also