A_CustomRailgun

From ZDoom Wiki
Jump to: navigation, search

A_CustomRailgun (int damage [, int offset [, color ringcolor [, color corecolor [, int flags [, bool aim [, float maxdiff [, str pufftype[, float spread_xy[, float spread_z]]]]]]]]])


A customizable railgun attack for monsters.

  • damage should be self-explanatory.
  • offset determines the horizontal offset (from the actor's center) where the railgun will emerge from. Negative values shift the beam to the actor's left, positive values shift it right.
  • ringcolor determines the color of the particles that form the spiral "ring" of the beam. You can use "none" to have no ring.
  • corecolor determines the color of the particles that form the central "core" of the beam. You can use "none" to have no core.
  • flags: The following flags can be combined by using the | character between the constant names:
    • RGF_SILENT — Silent: The railgun will not play an attack sound when firing.
    • RGF_NOPIERCING — Not piercing: The railgun will stop at the first enemy hit, rather than passing through.
    • RGF_EXPLICITANGLE — Explicit angle: The spread parameters are taken as explicit angles rather than maximum random amplitude. (New from 2.5.0)
  • aim determines which aiming mode to use:
    • 0: The monster shoots in the direction it is looking.
    • 1: The monster aims at its target.
  • maxxdiff is used to make the rail more jagged, or lightning-like, with higher numbers. This also affects the accuracy of the shot. Default is 0 (straight).
  • pufftype determines the puff actor to use. By default, the puff will only spawn in rare circumstances (e.g. when hitting a dormant monster) unless the puff actor has the ALWAYSPUFF flag set. Even if not shown, the selected puff will still be used for applying custom damagetypes and other properties.
  • spread_xy: Maximum angle of random horizontal spread. Defaults to 0. (New from 2.5.0)
  • spread_z: Maximum angle of random vertical spread. Defaults to 0. (New from 2.5.0)

The colors (for ringcolor and corecolor) can be specified as RRGGBB or as a color name such as Blue or Green

Examples

Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.
Personal tools
Namespaces
Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox