MissileSpread

From Eternity Wiki
Jump to navigationJump to search

Description

Convenience codepointer for firing a barrage of missiles in an angular sweep.

Usage

MissileSpread(type, number, addz, sweep, melee)

Parameters

  • type: Mnemonic of thing type to fire (no default, must be valid)
  • number: Number of missiles to fire (MUST be greater than or equal to 2)
  • addz: Amount to add to standard z missile firing height (32 units, default of 0 = 0, can be negative)
  • sweep: Total angular sweep of attack in degrees (default of 0 = 0)
  • melee: Mnemonic of state to enter for optional melee attack (default of 0 = 0, negative values = no melee attack)

Examples

No examples given.

Notes

The object will face its target and begin firing missiles at its angle minus half the sweep value. It will then step sweep / (number - 1) degrees for each additional missile, spreading them out evenly, centered on the actor's angle. Thus, the angular sweep is the total separation between the first and last missiles in degrees. This codepointer can only be used to fire 2 or more missiles. Providing a value of 0 or 1 will cause it to stop without attacking. The melee parameter can be used to specify a frame to use for an optional melee attack, used when the object is within melee range of its target. This parameter should be set to -1 unless a valid frame DeHackEd number or EDF mnemonic is provided.

See also