MissileSpread

From Eternity Wiki
Revision as of 10:44, 19 February 2012 by Printz (talk | contribs) (see also; cat)
Jump to navigationJump to search

Type: Monster attack, parameterized

Parameter Information:

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

Purpose: Convenience codepointer for firing a barrage of missiles in an angular sweep. The object will face its target and begin firing missiles at its angle minus half the Args4 sweep value. It will then step Args4 / (Args2 - 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 Args5 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